From db54ad8cefbd9c5a8ee2cc732c404b2b12828bb5 Mon Sep 17 00:00:00 2001 From: Yaacov Rydzinski Date: Thu, 18 Jul 2024 17:26:26 +0300 Subject: [PATCH] properly initialize deferUsages with their parents --- spec/Section 6 -- Execution.md | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/spec/Section 6 -- Execution.md b/spec/Section 6 -- Execution.md index 0371cfa52..a53183f0b 100644 --- a/spec/Section 6 -- Execution.md +++ b/spec/Section 6 -- Execution.md @@ -567,8 +567,11 @@ visitedFragments): - If {DoesFragmentTypeApply(objectType, fragmentType)} is {false}, continue with the next {selection} in {selectionSet}. - Let {fragmentSelectionSet} be the top-level selection set of {fragment}. - - If {deferDirective} is defined, let {fragmentDeferUsage} be - {deferDirective} and append it to {newDeferUsages}. + - If {deferDirective} is defined: + - Let {path} be the corresponding entry on {deferDirective}. + - Let {parentDeferUsage} be {deferUsage}. + - Let {fragmentDeferUsage} be an unordered map containing {path} and + {parentDeferUsage}. - Otherwise, let {fragmentDeferUsage} be {deferUsage}. - Let {fragmentGroupedFieldSet} and {fragmentNewDeferUsages} be the result of calling {CollectFields(objectType, fragmentSelectionSet, @@ -592,8 +595,11 @@ visitedFragments): - Let {deferDirective} be that directive. - If this execution is for a subscription operation, raise a _field error_. - - If {deferDirective} is defined, let {fragmentDeferUsage} be - {deferDirective} and append it to {newDeferUsages}. + - If {deferDirective} is defined: + - Let {path} be the corresponding entry on {deferDirective}. + - Let {parentDeferUsage} be {deferUsage}. + - Let {fragmentDeferUsage} be an unordered map containing {path} and + {parentDeferUsage}. - Otherwise, let {fragmentDeferUsage} be {deferUsage}. - Let {fragmentGroupedFieldSet} and {fragmentNewDeferUsages} be the result of calling {CollectFields(objectType, fragmentSelectionSet,