Skip to content

Commit 94363c9

Browse files
authored
CollectFields does not require path or asyncRecord (#11)
1 parent 8df13da commit 94363c9

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

spec/Section 6 -- Execution.md

+12-12
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ subsequentPayloads, asyncRecord):
416416
- If {path} is not provided, initialize it to an empty list.
417417
- If {subsequentPayloads} is not provided, initialize it to the empty set.
418418
- Let {groupedFieldSet} and {deferredGroupedFieldsList} be the result of
419-
{CollectFields(objectType, selectionSet, variableValues, path, asyncRecord)}.
419+
{CollectFields(objectType, selectionSet, variableValues)}.
420420
- Initialize {resultMap} to an empty ordered map.
421421
- For each {groupedFieldSet} as {responseKey} and {fields}:
422422
- Let {fieldName} be the name of the first entry in {fields}. Note: This value
@@ -648,8 +648,8 @@ The depth-first-search order of the field groups produced by {CollectFields()}
648648
is maintained through execution, ensuring that fields appear in the executed
649649
response in a stable and predictable order.
650650

651-
CollectFields(objectType, selectionSet, variableValues, path, asyncRecord,
652-
visitedFragments, deferredGroupedFieldsList):
651+
CollectFields(objectType, selectionSet, variableValues, visitedFragments,
652+
deferredGroupedFieldsList):
653653

654654
- If {visitedFragments} is not provided, initialize it to the empty set.
655655
- Initialize {groupedFields} to an empty ordered map of lists.
@@ -696,14 +696,14 @@ visitedFragments, deferredGroupedFieldsList):
696696
- Let {label} be the value or the variable to {deferDirective}'s {label}
697697
argument.
698698
- Let {deferredGroupedFields} be the result of calling
699-
{CollectFields(objectType, fragmentSelectionSet, variableValues, path,
700-
asyncRecord, visitedFragments, deferredGroupedFieldsList)}.
699+
{CollectFields(objectType, fragmentSelectionSet, variableValues,
700+
visitedFragments, deferredGroupedFieldsList)}.
701701
- Append a record containing {label} and {deferredGroupedFields} to
702702
{deferredGroupedFieldsList}.
703703
- Continue with the next {selection} in {selectionSet}.
704704
- Let {fragmentGroupedFieldSet} be the result of calling
705-
{CollectFields(objectType, fragmentSelectionSet, variableValues, path,
706-
asyncRecord, visitedFragments, deferredGroupedFieldsList)}.
705+
{CollectFields(objectType, fragmentSelectionSet, variableValues,
706+
visitedFragments, deferredGroupedFieldsList)}.
707707
- For each {fragmentGroup} in {fragmentGroupedFieldSet}:
708708
- Let {responseKey} be the response key shared by all fields in
709709
{fragmentGroup}.
@@ -726,21 +726,21 @@ visitedFragments, deferredGroupedFieldsList):
726726
- Let {label} be the value or the variable to {deferDirective}'s {label}
727727
argument.
728728
- Let {deferredGroupedFields} be the result of calling
729-
{CollectFields(objectType, fragmentSelectionSet, variableValues, path,
730-
asyncRecord, visitedFragments, deferredGroupedFieldsList)}.
729+
{CollectFields(objectType, fragmentSelectionSet, variableValues,
730+
visitedFragments, deferredGroupedFieldsList)}.
731731
- Append a record containing {label} and {deferredGroupedFields} to
732732
{deferredGroupedFieldsList}.
733733
- Continue with the next {selection} in {selectionSet}.
734734
- Let {fragmentGroupedFieldSet} be the result of calling
735-
{CollectFields(objectType, fragmentSelectionSet, variableValues, path,
736-
asyncRecord, visitedFragments, deferredGroupedFieldsList)}.
735+
{CollectFields(objectType, fragmentSelectionSet, variableValues,
736+
visitedFragments, deferredGroupedFieldsList)}.
737737
- For each {fragmentGroup} in {fragmentGroupedFieldSet}:
738738
- Let {responseKey} be the response key shared by all fields in
739739
{fragmentGroup}.
740740
- Let {groupForResponseKey} be the list in {groupedFields} for
741741
{responseKey}; if no such list exists, create it as an empty list.
742742
- Append all items in {fragmentGroup} to {groupForResponseKey}.
743-
- Return {groupedFields} and {deferredGroupedFieldsList}.
743+
- Return {groupedFields}, {deferredGroupedFieldsList} and {visitedFragments}.
744744

745745
Note: The steps in {CollectFields()} evaluating the `@skip` and `@include`
746746
directives may be applied in either order since they apply commutatively.

0 commit comments

Comments
 (0)