Skip to content

Commit 14b107f

Browse files
committed
properly initialize deferUsages with their parents
1 parent ab8ccc3 commit 14b107f

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

spec/Section 6 -- Execution.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -570,8 +570,11 @@ visitedFragments):
570570
- If {DoesFragmentTypeApply(objectType, fragmentType)} is {false}, continue
571571
with the next {selection} in {selectionSet}.
572572
- Let {fragmentSelectionSet} be the top-level selection set of {fragment}.
573-
- If {deferDirective} is defined, let {fragmentDeferUsage} be
574-
{deferDirective} and append it to {newDeferUsages}.
573+
- If {deferDirective} is defined:
574+
- Let {path} be the corresponding entry on {deferDirective}.
575+
- Let {parentDeferUsage} be {deferUsage}.
576+
- Let {fragmentDeferUsage} be an unordered map containing {path} and
577+
{parentDeferUsage}.
575578
- Otherwise, let {fragmentDeferUsage} be {deferUsage}.
576579
- Let {fragmentGroupedFieldSet} and {fragmentNewDeferUsages} be the result
577580
of calling {CollectFields(objectType, fragmentSelectionSet,
@@ -595,8 +598,11 @@ visitedFragments):
595598
- Let {deferDirective} be that directive.
596599
- If this execution is for a subscription operation, raise a _field
597600
error_.
598-
- If {deferDirective} is defined, let {fragmentDeferUsage} be
599-
{deferDirective} and append it to {newDeferUsages}.
601+
- If {deferDirective} is defined:
602+
- Let {path} be the corresponding entry on {deferDirective}.
603+
- Let {parentDeferUsage} be {deferUsage}.
604+
- Let {fragmentDeferUsage} be an unordered map containing {path} and
605+
{parentDeferUsage}.
600606
- Otherwise, let {fragmentDeferUsage} be {deferUsage}.
601607
- Let {fragmentGroupedFieldSet} and {fragmentNewDeferUsages} be the result
602608
of calling {CollectFields(objectType, fragmentSelectionSet,

0 commit comments

Comments
 (0)