@graphql-tools/executor-http 1.3.2 → 1.3.3-alpha-5cc2a0a01063f752e9ce9bc41432ab3d870d3a1a
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 +6 -0
- package/dist/index.cjs +7 -4
- package/dist/index.js +7 -4
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @graphql-tools/executor-http
|
|
2
2
|
|
|
3
|
+
## 1.3.3-alpha-5cc2a0a01063f752e9ce9bc41432ab3d870d3a1a
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#950](https://github.com/graphql-hive/gateway/pull/950) [`c7ea2c5`](https://github.com/graphql-hive/gateway/commit/c7ea2c5ae71b6b338ef22edd927a3fc93803965f) Thanks [@kroupacz](https://github.com/kroupacz)! - Errors should not be swallowed when it is thrown from the shared root
|
|
8
|
+
|
|
3
9
|
## 1.3.2
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/dist/index.cjs
CHANGED
|
@@ -519,9 +519,10 @@ function prepareGETUrl({
|
|
|
519
519
|
|
|
520
520
|
function buildHTTPExecutor(options) {
|
|
521
521
|
const printFn = options?.print ?? executorCommon.defaultPrintFn;
|
|
522
|
-
|
|
522
|
+
let disposeCtrl;
|
|
523
523
|
const serviceName = options?.serviceName;
|
|
524
524
|
const baseExecutor = (request, excludeQuery) => {
|
|
525
|
+
disposeCtrl ||= new AbortController();
|
|
525
526
|
if (disposeCtrl.signal.aborted) {
|
|
526
527
|
return createResultForAbort(disposeCtrl.signal.reason);
|
|
527
528
|
}
|
|
@@ -812,7 +813,7 @@ function buildHTTPExecutor(options) {
|
|
|
812
813
|
let result;
|
|
813
814
|
let attempt = 0;
|
|
814
815
|
function retryAttempt() {
|
|
815
|
-
if (disposeCtrl
|
|
816
|
+
if (disposeCtrl?.signal.aborted) {
|
|
816
817
|
return createResultForAbort(disposeCtrl.signal.reason);
|
|
817
818
|
}
|
|
818
819
|
attempt++;
|
|
@@ -842,14 +843,16 @@ function buildHTTPExecutor(options) {
|
|
|
842
843
|
[disposablestack.DisposableSymbols.dispose]: {
|
|
843
844
|
get() {
|
|
844
845
|
return function dispose() {
|
|
845
|
-
|
|
846
|
+
disposeCtrl?.abort(options?.getDisposeReason?.());
|
|
847
|
+
disposeCtrl = void 0;
|
|
846
848
|
};
|
|
847
849
|
}
|
|
848
850
|
},
|
|
849
851
|
[disposablestack.DisposableSymbols.asyncDispose]: {
|
|
850
852
|
get() {
|
|
851
853
|
return function asyncDispose() {
|
|
852
|
-
|
|
854
|
+
disposeCtrl?.abort(options?.getDisposeReason?.());
|
|
855
|
+
disposeCtrl = void 0;
|
|
853
856
|
};
|
|
854
857
|
}
|
|
855
858
|
}
|
package/dist/index.js
CHANGED
|
@@ -517,9 +517,10 @@ function prepareGETUrl({
|
|
|
517
517
|
|
|
518
518
|
function buildHTTPExecutor(options) {
|
|
519
519
|
const printFn = options?.print ?? defaultPrintFn;
|
|
520
|
-
|
|
520
|
+
let disposeCtrl;
|
|
521
521
|
const serviceName = options?.serviceName;
|
|
522
522
|
const baseExecutor = (request, excludeQuery) => {
|
|
523
|
+
disposeCtrl ||= new AbortController();
|
|
523
524
|
if (disposeCtrl.signal.aborted) {
|
|
524
525
|
return createResultForAbort(disposeCtrl.signal.reason);
|
|
525
526
|
}
|
|
@@ -810,7 +811,7 @@ function buildHTTPExecutor(options) {
|
|
|
810
811
|
let result;
|
|
811
812
|
let attempt = 0;
|
|
812
813
|
function retryAttempt() {
|
|
813
|
-
if (disposeCtrl
|
|
814
|
+
if (disposeCtrl?.signal.aborted) {
|
|
814
815
|
return createResultForAbort(disposeCtrl.signal.reason);
|
|
815
816
|
}
|
|
816
817
|
attempt++;
|
|
@@ -840,14 +841,16 @@ function buildHTTPExecutor(options) {
|
|
|
840
841
|
[DisposableSymbols.dispose]: {
|
|
841
842
|
get() {
|
|
842
843
|
return function dispose() {
|
|
843
|
-
|
|
844
|
+
disposeCtrl?.abort(options?.getDisposeReason?.());
|
|
845
|
+
disposeCtrl = void 0;
|
|
844
846
|
};
|
|
845
847
|
}
|
|
846
848
|
},
|
|
847
849
|
[DisposableSymbols.asyncDispose]: {
|
|
848
850
|
get() {
|
|
849
851
|
return function asyncDispose() {
|
|
850
|
-
|
|
852
|
+
disposeCtrl?.abort(options?.getDisposeReason?.());
|
|
853
|
+
disposeCtrl = void 0;
|
|
851
854
|
};
|
|
852
855
|
}
|
|
853
856
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphql-tools/executor-http",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.3-alpha-5cc2a0a01063f752e9ce9bc41432ab3d870d3a1a",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A set of utils for faster development of GraphQL tools",
|
|
6
6
|
"repository": {
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"extract-files": "13.0.0",
|
|
57
57
|
"graphql": "^16.9.0",
|
|
58
58
|
"graphql-yoga": "^5.13.2",
|
|
59
|
-
"pkgroll": "2.
|
|
59
|
+
"pkgroll": "2.12.1"
|
|
60
60
|
},
|
|
61
61
|
"sideEffects": false
|
|
62
62
|
}
|