@graphql-tools/executor-http 3.0.7-rc-8db5f91d48d70343835f0385391ceedca11067e4 → 3.0.7-rc-fb75c546d23aab2b1d2b4679334d64d4ee47d013
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 -2
- package/dist/index.cjs +9 -4
- package/dist/index.js +9 -4
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @graphql-tools/executor-http
|
|
2
2
|
|
|
3
|
-
## 3.0.7-rc-
|
|
3
|
+
## 3.0.7-rc-fb75c546d23aab2b1d2b4679334d64d4ee47d013
|
|
4
4
|
### Patch Changes
|
|
5
5
|
|
|
6
6
|
|
|
@@ -13,8 +13,12 @@
|
|
|
13
13
|
- [#1691](https://github.com/graphql-hive/gateway/pull/1691) [`7ecaf7e`](https://github.com/graphql-hive/gateway/commit/7ecaf7e8f658c4e4c1a91d1e8db3c1a8ceca51cb) Thanks [@dependabot](https://github.com/apps/dependabot)! - dependencies updates:
|
|
14
14
|
|
|
15
15
|
- Updated dependency [`@graphql-tools/utils@^10.10.3` ↗︎](https://www.npmjs.com/package/@graphql-tools/utils/v/10.10.3) (from `^10.10.1`, in `dependencies`)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
- [#1347](https://github.com/graphql-hive/gateway/pull/1347) [`2993f24`](https://github.com/graphql-hive/gateway/commit/2993f24f8e46853c0d2667c0cd2bf96190f3a2b2) Thanks [@ardatan](https://github.com/ardatan)! - Avoid shared AbortController instance on CloudflareWorkers because it gives `Cannot perform I/O on behalf of a different request.` error.
|
|
19
|
+
This change ensures that the AbortController is only created when not running in a Cloudflare Workers environment.
|
|
16
20
|
- Updated dependencies [[`7ecaf7e`](https://github.com/graphql-hive/gateway/commit/7ecaf7e8f658c4e4c1a91d1e8db3c1a8ceca51cb)]:
|
|
17
|
-
- @graphql-tools/executor-common@1.0.5-rc-
|
|
21
|
+
- @graphql-tools/executor-common@1.0.5-rc-fb75c546d23aab2b1d2b4679334d64d4ee47d013
|
|
18
22
|
|
|
19
23
|
## 3.0.6
|
|
20
24
|
### Patch Changes
|
package/dist/index.cjs
CHANGED
|
@@ -543,8 +543,10 @@ function buildHTTPExecutor(options) {
|
|
|
543
543
|
const printFn = options?.print ?? executorCommon.defaultPrintFn;
|
|
544
544
|
let disposeCtrl;
|
|
545
545
|
const baseExecutor = (request, excludeQuery) => {
|
|
546
|
-
|
|
547
|
-
|
|
546
|
+
if (!request.context?.request?.cf) {
|
|
547
|
+
disposeCtrl ||= new AbortController();
|
|
548
|
+
}
|
|
549
|
+
if (disposeCtrl?.signal.aborted) {
|
|
548
550
|
return createResultForAbort(disposeCtrl.signal.reason);
|
|
549
551
|
}
|
|
550
552
|
const fetchFn = request.extensions?.fetch ?? options?.fetch ?? fetch.fetch;
|
|
@@ -598,7 +600,10 @@ function buildHTTPExecutor(options) {
|
|
|
598
600
|
Object.assign(headers, headersFromExtensions);
|
|
599
601
|
request.extensions = restExtensions;
|
|
600
602
|
}
|
|
601
|
-
const signals = [
|
|
603
|
+
const signals = [];
|
|
604
|
+
if (disposeCtrl?.signal) {
|
|
605
|
+
signals.push(disposeCtrl.signal);
|
|
606
|
+
}
|
|
602
607
|
const signalFromRequest = request.signal || request.info?.signal;
|
|
603
608
|
if (signalFromRequest) {
|
|
604
609
|
if (signalFromRequest.aborted) {
|
|
@@ -612,7 +617,7 @@ function buildHTTPExecutor(options) {
|
|
|
612
617
|
if (subscriptionCtrl) {
|
|
613
618
|
signals.push(subscriptionCtrl.signal);
|
|
614
619
|
}
|
|
615
|
-
const signal$1 = signal.abortSignalAny(signals);
|
|
620
|
+
const signal$1 = signals.length ? signal.abortSignalAny(signals) : void 0;
|
|
616
621
|
const upstreamErrorExtensions = {
|
|
617
622
|
request: {
|
|
618
623
|
method
|
package/dist/index.js
CHANGED
|
@@ -541,8 +541,10 @@ function buildHTTPExecutor(options) {
|
|
|
541
541
|
const printFn = options?.print ?? defaultPrintFn;
|
|
542
542
|
let disposeCtrl;
|
|
543
543
|
const baseExecutor = (request, excludeQuery) => {
|
|
544
|
-
|
|
545
|
-
|
|
544
|
+
if (!request.context?.request?.cf) {
|
|
545
|
+
disposeCtrl ||= new AbortController();
|
|
546
|
+
}
|
|
547
|
+
if (disposeCtrl?.signal.aborted) {
|
|
546
548
|
return createResultForAbort(disposeCtrl.signal.reason);
|
|
547
549
|
}
|
|
548
550
|
const fetchFn = request.extensions?.fetch ?? options?.fetch ?? fetch;
|
|
@@ -596,7 +598,10 @@ function buildHTTPExecutor(options) {
|
|
|
596
598
|
Object.assign(headers, headersFromExtensions);
|
|
597
599
|
request.extensions = restExtensions;
|
|
598
600
|
}
|
|
599
|
-
const signals = [
|
|
601
|
+
const signals = [];
|
|
602
|
+
if (disposeCtrl?.signal) {
|
|
603
|
+
signals.push(disposeCtrl.signal);
|
|
604
|
+
}
|
|
600
605
|
const signalFromRequest = request.signal || request.info?.signal;
|
|
601
606
|
if (signalFromRequest) {
|
|
602
607
|
if (signalFromRequest.aborted) {
|
|
@@ -610,7 +615,7 @@ function buildHTTPExecutor(options) {
|
|
|
610
615
|
if (subscriptionCtrl) {
|
|
611
616
|
signals.push(subscriptionCtrl.signal);
|
|
612
617
|
}
|
|
613
|
-
const signal = abortSignalAny(signals);
|
|
618
|
+
const signal = signals.length ? abortSignalAny(signals) : void 0;
|
|
614
619
|
const upstreamErrorExtensions = {
|
|
615
620
|
request: {
|
|
616
621
|
method
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphql-tools/executor-http",
|
|
3
|
-
"version": "3.0.7-rc-
|
|
3
|
+
"version": "3.0.7-rc-fb75c546d23aab2b1d2b4679334d64d4ee47d013",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A set of utils for faster development of GraphQL tools",
|
|
6
6
|
"repository": {
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@graphql-hive/signal": "^2.0.0",
|
|
43
|
-
"@graphql-tools/executor-common": "1.0.5-rc-
|
|
43
|
+
"@graphql-tools/executor-common": "1.0.5-rc-fb75c546d23aab2b1d2b4679334d64d4ee47d013",
|
|
44
44
|
"@graphql-tools/utils": "^10.10.3",
|
|
45
45
|
"@repeaterjs/repeater": "^3.0.4",
|
|
46
46
|
"@whatwg-node/disposablestack": "^0.0.6",
|