@@ -538,14 +538,14 @@ parentPath):
538
538
539
539
- If {parentPath} is not provided, initialize it to an empty list.
540
540
- Let {groupedFieldSet} be the result of running {CollectFields(objectType,
541
- selectionSet, variableValues, parentPath )}.
541
+ selectionSet, variableValues)}.
542
542
- Initialize {resultMap} to an empty ordered map.
543
543
- Let {defers} be an empty unordered map.
544
544
- Let {streams} be an empty list.
545
545
- For each {groupedFieldSet} as {responseKey} and {fieldDetails}:
546
546
- Let {fieldDetail} be the first entry in {fieldDetails}.
547
547
- Let {field} be the value for the key {field} in {fieldDetail}.
548
- - Let {path} be the value for the key {path} in {fieldDetail} .
548
+ - Let {path} be a copy of {parentPath} with {responseKey} appended .
549
549
- Let {fieldName} be the name of {field}. Note: This value is unaffected if an
550
550
alias is used.
551
551
- Let {fieldType} be the return type defined for the field {fieldName} of
@@ -745,9 +745,8 @@ is maintained through execution, ensuring that fields appear in the executed
745
745
response in a stable and predictable order.
746
746
747
747
CollectFields(objectType, selectionSet, variableValues, isDeferred,
748
- visitedFragments, parentPath ):
748
+ visitedFragments):
749
749
750
- - If {parentPath} is not provided, initialize it to an empty list.
751
750
- If {isDeferred} is not provided, initialize it to {false}.
752
751
- If {visitedFragments} is not provided, initialize it to the empty set.
753
752
- Initialize {groupedFields} to an empty ordered map of lists.
@@ -766,11 +765,9 @@ visitedFragments, parentPath):
766
765
- Let {field} be {selection}.
767
766
- Let {responseKey} be the response key of {field} (the alias if defined,
768
767
otherwise the field name).
769
- - Let {path} be a copy of {parentPath} with {responseKey} appended.
770
768
- Let {groupForResponseKey} be the list in {groupedFields} for
771
769
{responseKey}; if no such list exists, create it as an empty list.
772
- - Let {fieldDetail} be an unordered map containing {field}, {path} and
773
- {isDeferred}.
770
+ - Let {fieldDetail} be an unordered map containing {field} and {isDeferred}.
774
771
- Append {fieldDetail} to the {groupForResponseKey}.
775
772
- If {selection} is a {FragmentSpread}:
776
773
- Let {fragmentSpreadName} be the name of {selection}.
@@ -793,7 +790,7 @@ visitedFragments, parentPath):
793
790
- Let {fragmentSelectionSet} be the top-level selection set of {fragment}.
794
791
- Let {fragmentGroupedFieldSet} be the result of running
795
792
{CollectFields(objectType, fragmentSelectionSet, variableValues,
796
- fragmentIsDeferred, visitedFragments, parentPath )}.
793
+ fragmentIsDeferred, visitedFragments)}.
797
794
- For each {fragmentGroup} in {fragmentGroupedFieldSet}:
798
795
- Let {responseKey} be the response key shared by all fields in
799
796
{fragmentGroup}.
@@ -814,7 +811,7 @@ visitedFragments, parentPath):
814
811
- Let {fragmentSelectionSet} be the top-level selection set of {selection}.
815
812
- Let {fragmentGroupedFieldSet} be the result of running
816
813
{CollectFields(objectType, fragmentSelectionSet, variableValues,
817
- fragmentIsDeferred, visitedFragments, parentPath )}.
814
+ fragmentIsDeferred, visitedFragments)}.
818
815
- For each {fragmentGroup} in {fragmentGroupedFieldSet}:
819
816
- Let {responseKey} be the response key shared by all fields in
820
817
{fragmentGroup}.
0 commit comments