Skip to content

Commit d6d3dd5

Browse files
robrichardyaacovCR
authored andcommitted
clarify canceling of subsequent payloads
1 parent a244909 commit d6d3dd5

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

spec/Section 6 -- Execution.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -455,11 +455,16 @@ If during {ExecuteSelectionSet()} a field with a non-null {fieldType} raises a
455455
_field error_ then that error must propagate to this entire selection set,
456456
either resolving to {null} if allowed or further propagated to a parent field.
457457

458-
If this occurs, any defer or stream executions with a path that starts with the
459-
same path as the resolved {null} must not return their results to the client.
460-
These defer or stream executions or any sibling fields which have not yet
461-
executed or have not yet yielded a value may be cancelled to avoid unnecessary
462-
work.
458+
If this occurs, any sibling fields which have not yet executed or have not yet
459+
yielded a value may be cancelled to avoid unnecessary work.
460+
461+
Additionally, the path of each {asyncRecord} in {subsequentPayloads} must be
462+
compared with the path of the field that ultimately resolved to {null}. If the
463+
path of any {asyncRecord} starts with, but is not equal to, the path of the
464+
resolved {null}, the {asyncRecord} must be removed from {subsequentPayloads} and
465+
its result must not be sent to clients. If these async records have not yet
466+
executed or have not yet yielded a value they may also be cancelled to avoid
467+
unnecessary work.
463468

464469
Note: See [Handling Field Errors](#sec-Handling-Field-Errors) for more about
465470
this behavior.

0 commit comments

Comments
 (0)