Skip to content

Commit 4ea2a34

Browse files
committed
clarify canceling of subsequent payloads
1 parent abb14a0 commit 4ea2a34

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
@@ -456,11 +456,16 @@ If during {ExecuteSelectionSet()} a field with a non-null {fieldType} raises a
456456
_field error_ then that error must propagate to this entire selection set,
457457
either resolving to {null} if allowed or further propagated to a parent field.
458458

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

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

0 commit comments

Comments
 (0)