Repository navigation
Conversation
|
@duckki is attempting to deploy a commit to the The GraphQL Foundation Team on Vercel. A member of the Team first needs to authorize it. |
|
I think/hope this is currently working as intended. The incremental completion notice section includes this bit:
Only Were the incremental data to complete successfully, we would get incremental results with partial data with Let me know if that is understandable and/or if there is something you think we should still correct. Thanks so much for your work on this and especially also with #4859 and all the cool stuff at https://duckki.github.io/2026/10/01/graphql-incremental-delivery-formalized.html |
|
Note that #4870 extacts an idea from the original version of #4859 in a scenario of multiple independently shared tasks that each fail, a newly encountered group could report both errors that propagating to a parent response position of the incremental result's response position. This is separate what this PR does, which is report even errors that do not propagate in such a manner. |
|
Thanks for the clarification. I understand the distinction now: completion errors explain why incremental delivery failed. An error handled at a nullable position would accompany partial data if delivery succeeded, but need not be preserved when that data cannot be delivered. |
Issue
{ ... @defer { nullable required } }With
nullable: Stringandrequired: String!, letnullablethrowError("nullable failed"), then letrequiredreturnnull. Both fields execute, and both raise an execution error. The deferred completion currently contains only the error at["required"]; the error already collected at["nullable"]disappears.The same loss occurs for a streamed non-null object item:
{ users @stream(initialCount: 0) { nullable required } }With
users: [User!]and the same field behavior onUser, the stream's failed completion reports only["users", 0, "required"]and drops["users", 0, "nullable"].executeExecutionGroupandcompleteStreamItemabort and rethrow the escaping non-null error. The publisher then constructs an error list from that single thrown value, losing the executor'scollectedErrors. This also affects the legacy response format.Relevant sections of the incremental-delivery draft, pinned to
045e193:These tests concern an error that has already been raised and collected. They do not require execution of siblings that may be cancelled after a non-null failure. The draft's failure-mapping algorithm uses a singular error; preserving the collected list here is the proposed treatment of that transport boundary.
Proposed solution
IncrementalExecutionErrorthrough the existing task and stream rejection paths.AggregateErrorobjects are not flattened.The first commit observes the existing loss with passing tests. The second commit implements the fix and corrects those expectations to retain both error paths. Each public query is validated before execution.
Verification
npm teststops at the Deno runtime check because Deno is not installed locally. The separately invoked integration suite is blocked by missing Docker.This PR is scoped separately from the deferred-group lifecycle changes in #4859. Both target
17.x.x. Their publisher edits overlap: when combined, retained group failures should useerrors.flatMap(getIncrementalErrors). The combined implementation is also checked locally.