Skip to content

Commit db54ad8

Browse files
committed
properly initialize deferUsages with their parents
1 parent 4b86250 commit db54ad8

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
@@ -567,8 +567,11 @@ visitedFragments):
567567
- If {DoesFragmentTypeApply(objectType, fragmentType)} is {false}, continue
568568
with the next {selection} in {selectionSet}.
569569
- Let {fragmentSelectionSet} be the top-level selection set of {fragment}.
570-
- If {deferDirective} is defined, let {fragmentDeferUsage} be
571-
{deferDirective} and append it to {newDeferUsages}.
570+
- If {deferDirective} is defined:
571+
- Let {path} be the corresponding entry on {deferDirective}.
572+
- Let {parentDeferUsage} be {deferUsage}.
573+
- Let {fragmentDeferUsage} be an unordered map containing {path} and
574+
{parentDeferUsage}.
572575
- Otherwise, let {fragmentDeferUsage} be {deferUsage}.
573576
- Let {fragmentGroupedFieldSet} and {fragmentNewDeferUsages} be the result
574577
of calling {CollectFields(objectType, fragmentSelectionSet,
@@ -592,8 +595,11 @@ visitedFragments):
592595
- Let {deferDirective} be that directive.
593596
- If this execution is for a subscription operation, raise a _field
594597
error_.
595-
- If {deferDirective} is defined, let {fragmentDeferUsage} be
596-
{deferDirective} and append it to {newDeferUsages}.
598+
- If {deferDirective} is defined:
599+
- Let {path} be the corresponding entry on {deferDirective}.
600+
- Let {parentDeferUsage} be {deferUsage}.
601+
- Let {fragmentDeferUsage} be an unordered map containing {path} and
602+
{parentDeferUsage}.
597603
- Otherwise, let {fragmentDeferUsage} be {deferUsage}.
598604
- Let {fragmentGroupedFieldSet} and {fragmentNewDeferUsages} be the result
599605
of calling {CollectFields(objectType, fragmentSelectionSet,

0 commit comments

Comments
 (0)