@graphql-tools/delegate 10.2.19 → 10.2.20-alpha-de2e938a921f04ca4bef925ceb74197fd44f9017
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/CHANGELOG.md +12 -0
- package/dist/index.cjs +6 -10
- package/dist/index.js +6 -10
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @graphql-tools/delegate
|
|
2
2
|
|
|
3
|
+
## 10.2.20-alpha-de2e938a921f04ca4bef925ceb74197fd44f9017
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#1280](https://github.com/graphql-hive/gateway/pull/1280) [`7552657`](https://github.com/graphql-hive/gateway/commit/75526572fdc9e766431539c6a68084ef1b2ee046) Thanks [@enisdenjo](https://github.com/enisdenjo)! - Relocate each error in multi-error ExecutionResult
|
|
8
|
+
|
|
9
|
+
Handling errors now works the same for both single-error and multi-error ExecutionResults.
|
|
10
|
+
|
|
11
|
+
- [#1280](https://github.com/graphql-hive/gateway/pull/1280) [`de2e938`](https://github.com/graphql-hive/gateway/commit/de2e938a921f04ca4bef925ceb74197fd44f9017) Thanks [@enisdenjo](https://github.com/enisdenjo)! - Remove trailing spaces when merging multi-error responses
|
|
12
|
+
|
|
13
|
+
- [#1280](https://github.com/graphql-hive/gateway/pull/1280) [`7552657`](https://github.com/graphql-hive/gateway/commit/75526572fdc9e766431539c6a68084ef1b2ee046) Thanks [@enisdenjo](https://github.com/enisdenjo)! - Call onLocatedError hook from delegation context for each error in multi-error ExecutionResult
|
|
14
|
+
|
|
3
15
|
## 10.2.19
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/dist/index.cjs
CHANGED
|
@@ -481,16 +481,12 @@ function mergeDataAndErrors(data, errors, path, onLocatedError, index = 1) {
|
|
|
481
481
|
return { data: utils.relocatedError(errors[0], newPath), unpathedErrors: [] };
|
|
482
482
|
}
|
|
483
483
|
const combinedError = new AggregateError(
|
|
484
|
-
errors.map(
|
|
485
|
-
(e)
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
graphql.locatedError(e, void 0, path)
|
|
491
|
-
)
|
|
492
|
-
),
|
|
493
|
-
errors.map((error) => error.message).join(", \n")
|
|
484
|
+
errors.map((e) => {
|
|
485
|
+
const error = onLocatedError ? onLocatedError(e) : e;
|
|
486
|
+
const newPath = path === void 0 ? error.path : !error.path ? path : path.concat(error.path.slice(1));
|
|
487
|
+
return utils.relocatedError(e, newPath);
|
|
488
|
+
}),
|
|
489
|
+
errors.map((error) => error.message).join(",\n")
|
|
494
490
|
);
|
|
495
491
|
return { data: combinedError, unpathedErrors: [] };
|
|
496
492
|
}
|
package/dist/index.js
CHANGED
|
@@ -481,16 +481,12 @@ function mergeDataAndErrors(data, errors, path, onLocatedError, index = 1) {
|
|
|
481
481
|
return { data: relocatedError(errors[0], newPath), unpathedErrors: [] };
|
|
482
482
|
}
|
|
483
483
|
const combinedError = new AggregateError(
|
|
484
|
-
errors.map(
|
|
485
|
-
(e)
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
locatedError(e, void 0, path)
|
|
491
|
-
)
|
|
492
|
-
),
|
|
493
|
-
errors.map((error) => error.message).join(", \n")
|
|
484
|
+
errors.map((e) => {
|
|
485
|
+
const error = onLocatedError ? onLocatedError(e) : e;
|
|
486
|
+
const newPath = path === void 0 ? error.path : !error.path ? path : path.concat(error.path.slice(1));
|
|
487
|
+
return relocatedError(e, newPath);
|
|
488
|
+
}),
|
|
489
|
+
errors.map((error) => error.message).join(",\n")
|
|
494
490
|
);
|
|
495
491
|
return { data: combinedError, unpathedErrors: [] };
|
|
496
492
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphql-tools/delegate",
|
|
3
|
-
"version": "10.2.
|
|
3
|
+
"version": "10.2.20-alpha-de2e938a921f04ca4bef925ceb74197fd44f9017",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A set of utils for faster development of GraphQL tools",
|
|
6
6
|
"repository": {
|
|
@@ -49,9 +49,9 @@
|
|
|
49
49
|
"tslib": "^2.8.1"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
|
-
"@types/lodash": "4.17.
|
|
52
|
+
"@types/lodash": "4.17.18",
|
|
53
53
|
"graphql": "^16.9.0",
|
|
54
|
-
"pkgroll": "2.
|
|
54
|
+
"pkgroll": "2.13.1"
|
|
55
55
|
},
|
|
56
56
|
"sideEffects": false
|
|
57
57
|
}
|