Packages

@graphql-tools/batch-execute

10.3.2 · 9 Nov 2026MIT15.5M / weekRepositorynpmAtom feed

Your version

10.3.0

23 Oct 2026Where it was published

10.3.2 is the newest release of 10.x.

In short

2 new1 fixed2 internal

Release note

The section about @graphql-tools/batch-execute of a note shared by several packages.

@graphql-tools/batch-execute@10.3.0

Minor Changes

  • Execution cancellation on batched requests

    When using Batched Execution, it is now possible to cancel the entire batched request if all individual requests' AbortSignals are aborted. This enhancement improves resource management and responsiveness in applications that utilize batched GraphQL operations.

    Previously, aborting individual requests did not affect the batched request. With this update, if all individual requests signal an abort, the batched request will also be aborted, ensuring that unnecessary processing is avoided.

    This feature is implemented using the new utility function abortSignalAll, which combines multiple AbortSignal instances into a single signal. If all of the individual signals are aborted, the combined signal will also be aborted, allowing for more efficient cancellation handling in batched operations.

  • Support @defer / @stream incremental delivery within schema stitching.

    Gateway-owned @defer (default): deferred selections are omitted from subgraph requests (only @requires / key dependencies are kept), so nested @defer can flush before slow fields resolve. Missing fields are filled later via type-merging or source resolvers.

    Subgraph-forwarded @defer: set defer: true on a SubschemaConfig (or defer: true on getStitchedSchemaFromSupergraphSdl) to forward @defer to that subgraph and merge incremental patches via IncrementalReceiver. With batch: true and batchingOptions.defer (or subschema.defer), multi-request batches wrap each root selection in @defer for subgraph compatibility; results are still collected before DataLoader waiters resolve. Single-request batches pass the AsyncIterable through so the initial payload can flush before deferred patches arrive.

    Hive Gateway config: extend deferStream instead of a separate flag:

    deferStream: true // client-facing only (gateway-owned omit)
    deferStream: { subgraph: true } // also forward @defer to every subgraph
    deferStream: { subgraph: { users: true, '*': false } } // per-subgraph

    @graphql-tools/executor-http adds mergeIncremental (default true: legacy growing snapshots). Set mergeIncremental: false to yield raw multipart parts like the default schema executor. Hive Gateway's @graphql-mesh/transport-http always uses passthrough (mergeIncremental: false).

    IncrementalReceiver prefers raw patches and cheaply tolerates accumulated snapshots (only fills missing keys). The HTTP executor preserves hasNext in accumulate mode.

    @stream continues to be forwarded on field directives as before. List streaming in @graphql-tools/delegate uses a plain async generator (no @repeaterjs/repeater dependency).

    Hive Router runtime does not plan incremental delivery yet; deferStream.subgraph applies to the stitching federation path.

Patch Changes

A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.