@graphql-tools/utils
Advanced tools
Comparing version 10.3.0-alpha-20240606221026-cd2a4fabe51906319f8dc07745f98f37ffbcbdee to 10.3.0-alpha-20240606224953-6d3be8381f7a6b24f2793457d1f05f89f1ae953a
@@ -13,19 +13,10 @@ "use strict"; | ||
]; | ||
if (incrementalResult.pending) { | ||
let paths = pathsMap.get(executionResult); | ||
if (paths === undefined) { | ||
paths = new Map(); | ||
pathsMap.set(executionResult, paths); | ||
} | ||
for (const { id, path } of incrementalResult.pending) { | ||
paths.set(id, ['data', ...path]); | ||
} | ||
} | ||
if (incrementalResult.pending) { | ||
const paths = pathsMap.get(executionResult); | ||
for (const { id, path } of incrementalResult.pending) { | ||
if (id !== undefined) { | ||
if (paths === undefined) { | ||
throw new Error('Invalid incremental delivery format.'); | ||
} | ||
for (const result of [executionResult, incrementalResult]) { | ||
if (result.pending) { | ||
let paths = pathsMap.get(executionResult); | ||
if (paths === undefined) { | ||
paths = new Map(); | ||
pathsMap.set(executionResult, paths); | ||
} | ||
for (const { id, path } of result.pending) { | ||
paths.set(id, ['data', ...path]); | ||
@@ -32,0 +23,0 @@ } |
@@ -9,19 +9,10 @@ import dlv from 'dlv'; | ||
]; | ||
if (incrementalResult.pending) { | ||
let paths = pathsMap.get(executionResult); | ||
if (paths === undefined) { | ||
paths = new Map(); | ||
pathsMap.set(executionResult, paths); | ||
} | ||
for (const { id, path } of incrementalResult.pending) { | ||
paths.set(id, ['data', ...path]); | ||
} | ||
} | ||
if (incrementalResult.pending) { | ||
const paths = pathsMap.get(executionResult); | ||
for (const { id, path } of incrementalResult.pending) { | ||
if (id !== undefined) { | ||
if (paths === undefined) { | ||
throw new Error('Invalid incremental delivery format.'); | ||
} | ||
for (const result of [executionResult, incrementalResult]) { | ||
if (result.pending) { | ||
let paths = pathsMap.get(executionResult); | ||
if (paths === undefined) { | ||
paths = new Map(); | ||
pathsMap.set(executionResult, paths); | ||
} | ||
for (const { id, path } of result.pending) { | ||
paths.set(id, ['data', ...path]); | ||
@@ -28,0 +19,0 @@ } |
{ | ||
"name": "@graphql-tools/utils", | ||
"version": "10.3.0-alpha-20240606221026-cd2a4fabe51906319f8dc07745f98f37ffbcbdee", | ||
"version": "10.3.0-alpha-20240606224953-6d3be8381f7a6b24f2793457d1f05f89f1ae953a", | ||
"description": "Common package containing utils and types for GraphQL tools", | ||
@@ -5,0 +5,0 @@ "sideEffects": false, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
504516
10939