@graphql-tools/executor
4.1.5 · 23 Oct 2026MIT6M / weekRepositoryHomepagenpmAtom feed
85 stable releases, newest first, by release line. Notes are quoted as the maintainers published them.
- 4.x · latest line
4.1.5
23 Oct 2026Use
fakePromise/fakeRejectPromisefor iteratorreturn/throw/asyncDisposeinstead of unnecessaryasync
4.1.4
22 Oct 2026Abort listeners on a request
AbortSignalare removed when query/mutation execution finishes, not only when the signal aborts.addEventListener('abort', listener, { once: true })drops the listener only when abort fires. A successful request never aborts, so the function stayed on the signal. A newAbortControllerper request hid this. Reusing one signal (YogauseExecutionCancellation()plus a stitchedbuildHTTPExecutor({ fetch: yoga.fetch })path) left one listener per finished query. Heap snapshots then grew with request count.const signal = controller.signal; await execute({ schema, document, signal }); await execute({ schema, document, signal }); // the first request's abort listener is now removedSubscriptions still keep the listener until abort, so cancel can close the stream.
Patch Changes
Abort listeners on a request
AbortSignalare removed when query/mutation execution finishes, not only when the signal aborts.addEventListener('abort', listener, { once: true })drops the listener only when abort fires. A successful request never aborts, so the function stayed on the signal. A newAbortControllerper request hid this. Reusing one signal (YogauseExecutionCancellation()plus a stitchedbuildHTTPExecutor({ fetch: yoga.fetch })path) left one listener per finished query. Heap snapshots then grew with request count.const signal = controller.signal; await execute({ schema, document, signal }); await execute({ schema, document, signal }); // the first request's abort listener is now removedSubscriptions still keep the listener until abort, so cancel can close the stream.
4.1.3
22 Oct 2026Only updates a dependency:@graphql-tools/utils 13.1.2
4.1.2
20 Oct 2026Executor now collects
@deferfields the way graphql-js 17IncrementalExecutordoes: overlapping fields execute once in the parent group instead of again in the deferred patch. Subsequent payloads only contain fields that were not already delivered. When a field is nulled by error bubbling, deferred and streamed work at or under that path is cancelled (and ancestor patches that would write into the nulled subtree are dropped), matching graphql-js 17hasNulledPosition. Default / non-incremental execution still uses the previous collect path.
4.1.1
20 Oct 2026Only updates a dependency:@graphql-tools/utils 13.1.1
4.1.0
20 Oct 2026@graphql-tools/executorcan publish both incremental delivery payload formats from one execution kernel. PassincrementalSpec: 'v0.1' | 'v0.2'onexecute/subscribe/normalizedExecutor(also onExecutionRequestforexecutorFromSchema).'v0.1'remains the default and keeps the existingpath/labelpatches used withmultipart/mixed;deferSpec=20220824.'v0.2'emits Apollo incremental v0.2 payloads (pendingwithidandpath,incrementalwithidand optionalsubPath,completed) used withmultipart/mixed;incrementalSpec=v0.2.Field execution,
@defer/@streamscheduling, andAbortSignalcancellation are shared. Spec-specific JSON is built by a publisher: v0.1 still yields{ incremental, hasNext }; v0.2 assigns ids when a pending group is first announced, groups streamed items under one pending path, and reports completion separately. Nested@deferpatches are collected as children of the parent patch so v0.2 can announce the inner fragment only after the parent is pending, without making the nested fragment wait on the parent's promise (v0.1 sibling completion is unchanged aside from incremental array order).Publisher state (
Map/Setof ids) is allocated only for'v0.2'.StreamGroupis created only for v0.2 and only when items are actually streamed. v0.2 stream completion uses an open-count on the group instead of scanningsubsequentPayloads.mergeIncrementalResultstill merges v0.1path/itemspatches. For v0.2 it recordspendingids on the execution result, writes deferreddataatpending.path + subPath, appends streameditemsonto the list atpending.path, and foldscompleted.errorsintoerrors.visitResultflattens nested deferred patches so result visiting still sees fields that live under a child@defer.
Minor Changes
@graphql-tools/executorcan publish both incremental delivery payload formats from one execution kernel. PassincrementalSpec: 'v0.1' | 'v0.2'onexecute/subscribe/normalizedExecutor(also onExecutionRequestforexecutorFromSchema).'v0.1'remains the default and keeps the existingpath/labelpatches used withmultipart/mixed;deferSpec=20220824.'v0.2'emits Apollo incremental v0.2 payloads (pendingwithidandpath,incrementalwithidand optionalsubPath,completed) used withmultipart/mixed;incrementalSpec=v0.2.Field execution,
@defer/@streamscheduling, andAbortSignalcancellation are shared. Spec-specific JSON is built by a publisher: v0.1 still yields{ incremental, hasNext }; v0.2 assigns ids when a pending group is first announced, groups streamed items under one pending path, and reports completion separately. Nested@deferpatches are collected as children of the parent patch so v0.2 can announce the inner fragment only after the parent is pending, without making the nested fragment wait on the parent's promise (v0.1 sibling completion is unchanged aside from incremental array order).Publisher state (
Map/Setof ids) is allocated only for'v0.2'.StreamGroupis created only for v0.2 and only when items are actually streamed. v0.2 stream completion uses an open-count on the group instead of scanningsubsequentPayloads.mergeIncrementalResultstill merges v0.1path/itemspatches. For v0.2 it recordspendingids on the execution result, writes deferreddataatpending.path + subPath, appends streameditemsonto the list atpending.path, and foldscompleted.errorsintoerrors.visitResultflattens nested deferred patches so result visiting still sees fields that live under a child@defer.
4.0.1 – 4.0.22 releases that only update dependencies@graphql-tools/utils 13.0.2Show each
- 4.0.219 Oct 2026@graphql-tools/utils 13.0.2
- 4.0.119 Oct 2026@graphql-tools/utils 13.0.1
4.0.0
19 Oct 2026- breaking
stop exporting
getVariableValuesfrom@graphql-tools/executor. Usegraphql'sgetVariableValuesinstead.Execution now calls graphql-js directly for variable coercion (including GraphQL 17 SDL input-field defaults on omitted variables). The maintained fork and helpers (
values.ts,validateInputValue, etc.) were removed.
- 3.x
3.0.0
19 Oct 2026- breaking
Drop GraphQL v14/v15 support and require Node.js >= 22.18.
On Node.js ≥26.1 (and ≥24.16 where backported),
fs.globfollowSymlinksis used.On older engines, symlink directories are discovered only under each pattern’s literal prefix (not the whole
cwd) and patterns are re-rooted.
Major Changes
- breaking
Drop GraphQL v14/v15 support and require Node.js >= 22.18.
graphqlpeer range is now^16.0.0 || ^17.0.0.engines.nodeis now>=22.18.0(Nodefs.glob+ Babel 8).Dev tooling and
@graphql-tools/graphql-tag-pluckmove to Babel 8 (@babel/core/ parser / traverse / types).The standalone
cross-inspectpackage is discontinued. Useinspectfrom@graphql-tools/utilsinstead (Nodeutil.inspectviaprocess.getBuiltinModule, with a smallJSON.stringify/Stringfallback).
Removed
@graphql-tools/utilsexportsRemoved Use instead getArgumentValuesimport { getArgumentValues } from 'graphql'coerceInputs/graphqlJSCompatgraphql@16+ APIs ( getArgumentValues, etc.)createDeferred/createDeferredPromiseconst { promise, resolve, reject } = Promise.withResolvers()createGraphQLErrornew GraphQLError(message, options)fromgraphqlmapMaybePromisehandleMaybePromisefrom@whatwg-node/promise-helpersisPromise/fakePromise/mapAsyncIterator/MaybePromise@whatwg-node/promise-helpersregisterAbortSignalListener/getAbortPromiseAbortSignalAPIs (throwIfAborted,addEventListener('abort', …, { once: true }),AbortSignal.any, …)withCancel/getAsyncIterableWithCancel/getAsyncIteratorWithCancelHandle cancellation on the async iterator’s return()(or your transport abort path)debugTimerStart/debugTimerEndYour own timing / console.timeif neededPromiseWithResolvers(type)Built-in PromiseWithResolvers<T>/ return type ofPromise.withResolvers()inspectand the WeakMapmemoize1…memoize2of5helpers remain on@graphql-tools/utils(inspect is no longer re-exported fromcross-inspect).File matching (
globby→fs.glob)Loaders and
@graphql-tools/load-filesnow use Node’sfs.globthrough:import { matchFiles, matchFilesSync } from '@graphql-tools/load-files';Directory symlinks are followed for recursive (
**) patterns:On Node.js ≥26.1 (and ≥24.16 where backported),
fs.globfollowSymlinksis used.On older engines, symlink directories are discovered only under each pattern’s literal prefix (not the whole
cwd) and patterns are re-rooted.Non-recursive / literal patterns skip the symlink walk entirely.
@graphql-tools/executorhot-path caches (collectSubfields, argument coercion,@streamdetection) usememoize2/memoize3from utils.collectSubFieldsin utils stays unmemoized so the executor can own a single memoize3 layer.Errors and other cleanup
Prefer
new GraphQLError(message, options)fromgraphql. Experimental schemacoordinatesupport remains onlocatedError/relocatedError/getSchemaCoordinate.Removed GraphQL versions older than 16 compatibility branches (error construction, validation rule name suffixes,
URL.canParsefallback).Promise helpers should be imported from
@whatwg-node/promise-helpers(handleMaybePromise,isPromise,fakePromise,mapAsyncIterator,MaybePromise) rather than re-exported from utils.
Patch Changes
dependencies updates:
Updated dependency
graphql@^16.0.0 || ^17.0.0↗︎ (from^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0, inpeerDependencies)
- 2.x
2.1.0
17 Oct 2026Support
hideSuggestionsonExecutionArgsand pass it through variable coercion so "Did you mean" suggestions can be omitted from invalid variable errors, matchinggraphql@17.
2.0.5
15 Oct 2026dependencies updates:
Preserve response field order when asynchronous resolvers complete, including in deferred data and streamed items.
utils: coerce GraphQL 17 argument defaults in getArgumentValues via local input coercion (defaults, missing variables, nested sources)
Patch Changes
dependencies updates:
Updated dependency
@graphql-tools/utils@^12.0.4↗︎ (from^12.0.3, independencies)
Preserve response field order when asynchronous resolvers complete, including in deferred data and streamed items.
utils: coerce GraphQL 17 argument defaults in getArgumentValues via local input coercion (defaults, missing variables, nested sources)
2.0.3 – 2.0.42 releases that only update dependencies@graphql-tools/utils 12.0.4Show each
- 2.0.412 Oct 2026@graphql-tools/utils 12.0.4
- 2.0.330 Sep 2026@graphql-tools/utils 12.0.3
2.0.2
30 Sep 2026dependencies updates:
dependencies updates:
Patch Changes
dependencies updates:
Updated dependency
@whatwg-node/disposablestack@^0.1.0↗︎ (from^0.0.6, independencies)
dependencies updates:
Updated dependency
@whatwg-node/promise-helpers@^2.0.0↗︎ (from^1.0.0, independencies)
2.0.1
7 Sep 2026Only updates a dependency:@graphql-tools/utils 12.0.1
2.0.0
12 Aug 2026Major Changes
- breaking
#8346
2273c21Thanks @ardatan! - This release adds GraphQL v17 support and aligns the existing executor implementation with the latest GraphQL v17 API changes. The following changes are included:getAsyncHelpersis now available onGraphQLResolveInfo. Itstrackmethod is used wheneverwaitUntilis available, as in Yoga's Explicit Resource ManagementgetAbortSignalis now available onGraphQLResolveInfo, matching behavior that was already available in this executor implementation, as in Yoga's Execution CancellationGraphQLResolveInfoautomatically alignsvariableValuesaccording to the GraphQL version for better compatibility. In GraphQL v17 and above,variableValuesfollows the wrapped shape ({ coerced, sources }) expected by GraphQL APIs. In GraphQL v16 and below,variableValuesremains a flat map as in previous versions.If your custom scalar resolvers define
__serializeand__parseValue, they are automatically mapped tocoerceOutputValueandcoerceInputValuein GraphQL v17.BREAKING:
@graphql-tools/executor'sgetVariableValuesnow returns{ variableValues }on success, wherevariableValuesis aVariableValuesobject ({ coerced, sources }). On failure, it returns{ errors }.BREAKING:
collectFields,shouldIncludeNode,getDeferValues, andcollectSubFieldsnow need aVariableValuesobject instead ofRecord<string, any>for thevariableValuesargument.visitResultnow internally normalizesExecutionRequest.variablesinto aVariableValues-compatible shape ({ coerced, sources }) before traversing selections.
- 1.x
1.5.7
17 Jul 2026Reading the note…
1.5.6
17 Jul 2026Reading the note…
1.5.5
6 Jul 2026Reading the note…
1.5.4
28 Jun 2026Reading the note…
1.5.3
23 Apr 2026Reading the note…
1.5.2
9 Apr 2026Reading the note…
1.5.1
7 Jan 2026Reading the note…
1.5.0
28 Nov 2025Reading the note…
1.4.13
12 Nov 2025Reading the note…
1.4.12
11 Nov 2025Reading the note…
1.4.11
4 Nov 2025Reading the note…
1.4.10
30 Oct 2025Reading the note…
1.4.9
21 Jul 2025Reading the note…
1.4.8
17 Jul 2025Reading the note…
1.4.7
28 Mar 2025Reading the note…
1.4.6
13 Mar 2025Reading the note…
1.4.5
13 Mar 2025Reading the note…
1.4.4
5 Mar 2025Reading the note…
1.4.3
3 Mar 2025Reading the note…
1.4.2
25 Feb 2025Reading the note…
1.4.1
21 Feb 2025Reading the note…
1.4.0
19 Feb 2025Reading the note…
1.3.14
10 Feb 2025Reading the note…
1.3.13
10 Feb 2025Reading the note…
1.3.12
6 Jan 2025Reading the note…
1.3.11
2 Jan 2025Reading the note…
1.3.10
24 Dec 2024Reading the note…
1.3.9
14 Dec 2024Reading the note…
1.3.8
13 Dec 2024Reading the note…
1.3.7
11 Dec 2024Reading the note…
1.3.6
4 Dec 2024Reading the note…
1.3.5
27 Nov 2024Reading the note…
1.3.4
22 Nov 2024Reading the note…