@graphql-tools/delegate 8.7.5 → 8.7.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +1 -1
- package/index.mjs +1 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -863,7 +863,7 @@ function mergeDataAndErrors(data, errors, path, onLocatedError, index = 1) {
|
|
|
863
863
|
}
|
|
864
864
|
if (errors.length === 1) {
|
|
865
865
|
const error = onLocatedError ? onLocatedError(errors[0]) : errors[0];
|
|
866
|
-
const newPath = path === undefined ? error.path : error.path
|
|
866
|
+
const newPath = path === undefined ? error.path : !error.path ? path : path.concat(error.path.slice(1));
|
|
867
867
|
return { data: utils.relocatedError(errors[0], newPath), unpathedErrors: [] };
|
|
868
868
|
}
|
|
869
869
|
// We cast path as any for GraphQL.js 14 compat
|
package/index.mjs
CHANGED
|
@@ -859,7 +859,7 @@ function mergeDataAndErrors(data, errors, path, onLocatedError, index = 1) {
|
|
|
859
859
|
}
|
|
860
860
|
if (errors.length === 1) {
|
|
861
861
|
const error = onLocatedError ? onLocatedError(errors[0]) : errors[0];
|
|
862
|
-
const newPath = path === undefined ? error.path : error.path
|
|
862
|
+
const newPath = path === undefined ? error.path : !error.path ? path : path.concat(error.path.slice(1));
|
|
863
863
|
return { data: relocatedError(errors[0], newPath), unpathedErrors: [] };
|
|
864
864
|
}
|
|
865
865
|
// We cast path as any for GraphQL.js 14 compat
|