@graphql-tools/executor-graphql-ws 2.0.4 → 2.0.5-alpha-248f71f87ccb9c2e0c266ff5c3e36d472ebbc305
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 -3
- package/dist/index.js +8 -4
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @graphql-tools/executor-graphql-ws
|
|
2
2
|
|
|
3
|
+
## 2.0.5-alpha-248f71f87ccb9c2e0c266ff5c3e36d472ebbc305
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#862](https://github.com/graphql-hive/gateway/pull/862) [`2d793a3`](https://github.com/graphql-hive/gateway/commit/2d793a38dbbfd41fea63e225e7799dd94e4742d7) Thanks [@ardatan](https://github.com/ardatan)! - Use signal.addEventListener instead of leaking `registerAbortSignalListener` helper
|
|
8
|
+
|
|
3
9
|
## 2.0.4
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/dist/index.cjs
CHANGED
|
@@ -61,9 +61,13 @@ function buildGraphQLWSExecutor(clientOptionsOrClient) {
|
|
|
61
61
|
executorCommon.serializeExecutionRequest({ executionRequest, printFn })
|
|
62
62
|
);
|
|
63
63
|
if (iterableIterator.return && signal) {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
64
|
+
signal.addEventListener(
|
|
65
|
+
"abort",
|
|
66
|
+
() => {
|
|
67
|
+
iterableIterator.return?.();
|
|
68
|
+
},
|
|
69
|
+
{ once: true }
|
|
70
|
+
);
|
|
67
71
|
}
|
|
68
72
|
if (operationType === "subscription") {
|
|
69
73
|
return iterableIterator;
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { serializeExecutionRequest, defaultPrintFn } from '@graphql-tools/executor-common';
|
|
2
|
-
import { getOperationASTFromRequest
|
|
2
|
+
import { getOperationASTFromRequest } from '@graphql-tools/utils';
|
|
3
3
|
import { DisposableSymbols } from '@whatwg-node/disposablestack';
|
|
4
4
|
import { createClient } from 'graphql-ws';
|
|
5
5
|
import WebSocket from 'isomorphic-ws';
|
|
@@ -55,9 +55,13 @@ function buildGraphQLWSExecutor(clientOptionsOrClient) {
|
|
|
55
55
|
serializeExecutionRequest({ executionRequest, printFn })
|
|
56
56
|
);
|
|
57
57
|
if (iterableIterator.return && signal) {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
58
|
+
signal.addEventListener(
|
|
59
|
+
"abort",
|
|
60
|
+
() => {
|
|
61
|
+
iterableIterator.return?.();
|
|
62
|
+
},
|
|
63
|
+
{ once: true }
|
|
64
|
+
);
|
|
61
65
|
}
|
|
62
66
|
if (operationType === "subscription") {
|
|
63
67
|
return iterableIterator;
|
package/package.json
CHANGED