GraphQL execution cancellation behavior changes between graphql-js v15 and v16
0 reputation · 28 Oct 2021, 23:19 UTC
GraphQL execution cancellation behavior changes between graphql-js v15 and v16
The goal is to determine whether a GraphQL server aborts ongoing resolver execution when an HTTP client closes the connection early, and how this behavior differs between graphql-js releases v15 and v16.
Constraints arise because the GraphQL specification delegates cancellation to the transport layer, the reference execute function does not expose a standard abort signal, and server frameworks may map request close events to resolver cancellation differently. Additionally, partial data may be returned alongside errors, making client‑side interpretation ambiguous.
What mechanisms, if any, does graphql-js v15 provide for propagating an HTTP abort signal into the execution context? Does graphql-js v16 introduce a standardized way to cancel resolvers via an AbortSignal or similar API? How should clients interpret partial data and errors when a timeout occurs during field resolution?