Skip to content

Commit 1b56d86

Browse files
committed
Remove path from CollectFields
1 parent df84d1b commit 1b56d86

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

spec/Section 6 -- Execution.md

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -538,14 +538,14 @@ parentPath):
538538

539539
- If {parentPath} is not provided, initialize it to an empty list.
540540
- Let {groupedFieldSet} be the result of running {CollectFields(objectType,
541-
selectionSet, variableValues, parentPath)}.
541+
selectionSet, variableValues)}.
542542
- Initialize {resultMap} to an empty ordered map.
543543
- Let {defers} be an empty unordered map.
544544
- Let {streams} be an empty list.
545545
- For each {groupedFieldSet} as {responseKey} and {fieldDetails}:
546546
- Let {fieldDetail} be the first entry in {fieldDetails}.
547547
- 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.
549549
- Let {fieldName} be the name of {field}. Note: This value is unaffected if an
550550
alias is used.
551551
- 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
745745
response in a stable and predictable order.
746746

747747
CollectFields(objectType, selectionSet, variableValues, isDeferred,
748-
visitedFragments, parentPath):
748+
visitedFragments):
749749

750-
- If {parentPath} is not provided, initialize it to an empty list.
751750
- If {isDeferred} is not provided, initialize it to {false}.
752751
- If {visitedFragments} is not provided, initialize it to the empty set.
753752
- Initialize {groupedFields} to an empty ordered map of lists.
@@ -766,11 +765,9 @@ visitedFragments, parentPath):
766765
- Let {field} be {selection}.
767766
- Let {responseKey} be the response key of {field} (the alias if defined,
768767
otherwise the field name).
769-
- Let {path} be a copy of {parentPath} with {responseKey} appended.
770768
- Let {groupForResponseKey} be the list in {groupedFields} for
771769
{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}.
774771
- Append {fieldDetail} to the {groupForResponseKey}.
775772
- If {selection} is a {FragmentSpread}:
776773
- Let {fragmentSpreadName} be the name of {selection}.
@@ -793,7 +790,7 @@ visitedFragments, parentPath):
793790
- Let {fragmentSelectionSet} be the top-level selection set of {fragment}.
794791
- Let {fragmentGroupedFieldSet} be the result of running
795792
{CollectFields(objectType, fragmentSelectionSet, variableValues,
796-
fragmentIsDeferred, visitedFragments, parentPath)}.
793+
fragmentIsDeferred, visitedFragments)}.
797794
- For each {fragmentGroup} in {fragmentGroupedFieldSet}:
798795
- Let {responseKey} be the response key shared by all fields in
799796
{fragmentGroup}.
@@ -814,7 +811,7 @@ visitedFragments, parentPath):
814811
- Let {fragmentSelectionSet} be the top-level selection set of {selection}.
815812
- Let {fragmentGroupedFieldSet} be the result of running
816813
{CollectFields(objectType, fragmentSelectionSet, variableValues,
817-
fragmentIsDeferred, visitedFragments, parentPath)}.
814+
fragmentIsDeferred, visitedFragments)}.
818815
- For each {fragmentGroup} in {fragmentGroupedFieldSet}:
819816
- Let {responseKey} be the response key shared by all fields in
820817
{fragmentGroup}.

0 commit comments

Comments
 (0)