Skip to content

Commit 84b122c

Browse files
AbortController support (#4250)
This adds support for aborting execution from the outside or resolvers, this adds a few tests and tries to make the support as easy as possible. Do we want to support having abort support on subscriptions, I guess it makes sense for server-sent events. I've chosen 2 places to place these interrupts - `executeFieldsSerially` - every time we start a new mutation we check whether the runtime has interrupted - `executeFields` - every time we start executing a new field we check whether the runtime has interrupted - inside of the catch block as well so we return a singular error, all though this doesn't really matter as the consumer would not receive anything - this here should also take care of deferred fields When comparing this to `graphql-tools/execute` I am not sure whether we want to match this behavior, this throws a DomException which would be a whole new exception that gets thrown while normally during execution we wrap everything with GraphQLErrors. Supersedes #3791 Resolves #3764 Co-authored-by: yaacovCR <[email protected]>
1 parent f531737 commit 84b122c

File tree

6 files changed

+398
-7
lines changed

6 files changed

+398
-7
lines changed

integrationTests/ts/tsconfig.json

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
{
22
"compilerOptions": {
33
"module": "commonjs",
4-
"lib": ["es2019", "es2020.promise", "es2020.bigint", "es2020.string"],
4+
"lib": [
5+
"es2019",
6+
"es2020.promise",
7+
"es2020.bigint",
8+
"es2020.string",
9+
"DOM"
10+
],
511
"noEmit": true,
612
"types": [],
713
"strict": true,

package-lock.json

+4-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
"@svgr/webpack": "8.1.0",
6363
"@types/chai": "4.3.19",
6464
"@types/mocha": "10.0.7",
65-
"@types/node": "22.5.4",
65+
"@types/node": "22.7.7",
6666
"@typescript-eslint/eslint-plugin": "8.4.0",
6767
"@typescript-eslint/parser": "8.4.0",
6868
"c8": "10.1.2",

0 commit comments

Comments
 (0)