@@ -369,9 +369,9 @@ continues until there are no more subfields to collect and execute.
369369operation. A root selection set always selects from a _ root operation type_ .
370370
371371To execute the root selection set, the initial value being evaluated and the
372- root type must be known, as well as whether each field must be executed
373- serially , or normally by executing all fields in parallel (see
374- [ Normal and Serial Execution] ( #sec-Normal-and-Serial-Execution ) .
372+ root type must be known, as well as whether the fields must be executed in a
373+ series , or normally by executing all fields in parallel (see
374+ [ Normal and Serial Execution] ( #sec-Normal-and-Serial-Execution ) ) .
375375
376376Executing the root selection set works similarly for queries (parallel),
377377mutations (serial), and subscriptions (where it is executed for each event in
@@ -396,10 +396,9 @@ executionMode):
396396### Field Collection
397397
398398Before execution, each _ selection set_ is converted to a _ collected fields map_
399- by calling {CollectFields()} by collecting all fields with the same response
400- name, including those in referenced fragments, into an individual _ field set_ .
401- This ensures that multiple references to fields with the same response name will
402- only be executed once.
399+ by collecting all fields with the same response name, including those in
400+ referenced fragments, into an individual _ field set_ . This ensures that multiple
401+ references to fields with the same response name will only be executed once.
403402
404403:: A _ collected fields map_ is an ordered map where each entry is a _ response
405404name_ and its associated _ field set_ . A _ collected fields map_ may be produced
@@ -436,8 +435,8 @@ fragment ExampleFragment on Query {
436435}
437436```
438437
439- The depth-first-search order of the _ field set_ produced by {CollectFields()} is
440- maintained through execution, ensuring that fields appear in the executed
438+ The depth-first-search order of each _ field set_ produced by {CollectFields()}
439+ is maintained through execution, ensuring that fields appear in the executed
441440response in a stable and predictable order.
442441
443442CollectFields(objectType, selectionSet, variableValues, visitedFragments):
@@ -475,11 +474,11 @@ CollectFields(objectType, selectionSet, variableValues, visitedFragments):
475474 - If {DoesFragmentTypeApply(objectType, fragmentType)} is {false}, continue
476475 with the next {selection} in {selectionSet}.
477476 - Let {fragmentSelectionSet} be the top-level selection set of {fragment}.
478- - Let {fragmentCollectedFieldMap } be the result of calling
477+ - Let {fragmentCollectedFieldsMap } be the result of calling
479478 {CollectFields(objectType, fragmentSelectionSet, variableValues,
480479 visitedFragments)}.
481480 - For each {responseName} and {fragmentFields} in
482- {fragmentCollectedFieldMap }:
481+ {fragmentCollectedFieldsMap }:
483482 - Let {fieldsForResponseName} be the _ field set_ value in
484483 {collectedFieldsMap} for the key {responseName}; otherwise create the
485484 entry with an empty ordered set.
@@ -490,11 +489,11 @@ CollectFields(objectType, selectionSet, variableValues, visitedFragments):
490489 fragmentType)} is {false}, continue with the next {selection} in
491490 {selectionSet}.
492491 - Let {fragmentSelectionSet} be the top-level selection set of {selection}.
493- - Let {fragmentCollectedFieldMap } be the result of calling
492+ - Let {fragmentCollectedFieldsMap } be the result of calling
494493 {CollectFields(objectType, fragmentSelectionSet, variableValues,
495494 visitedFragments)}.
496495 - For each {responseName} and {fragmentFields} in
497- {fragmentCollectedFieldMap }:
496+ {fragmentCollectedFieldsMap }:
498497 - Let {fieldsForResponseName} be the _ field set_ value in
499498 {collectedFieldsMap} for the key {responseName}; otherwise create the
500499 entry with an empty ordered set.
@@ -518,8 +517,8 @@ directives may be applied in either order since they apply commutatively.
518517
519518** Merging Selection Sets**
520519
521- In order to execute the sub-selections of a object typed field, all _ selection
522- sets_ of each field with the same response name of the parent _ field set_ are
520+ In order to execute the sub-selections of an object typed field, all _ selection
521+ sets_ of each field with the same response name in the parent _ field set_ are
523522merged together into a single _ collected fields map_ representing the subfields
524523to be executed next.
525524
@@ -554,9 +553,9 @@ CollectSubfields(objectType, fields, variableValues):
554553- For each {field} in {fields}:
555554 - Let {fieldSelectionSet} be the selection set of {field}.
556555 - If {fieldSelectionSet} is null or empty, continue to the next field.
557- - Let {fieldCollectedFieldMap } be the result of {CollectFields(objectType,
556+ - Let {fieldCollectedFieldsMap } be the result of {CollectFields(objectType,
558557 fieldSelectionSet, variableValues)}.
559- - For each {responseName} and {subfields} in {fieldCollectedFieldMap }:
558+ - For each {responseName} and {subfields} in {fieldCollectedFieldsMap }:
560559 - Let {fieldsForResponseName} be the _ field set_ value in
561560 {collectedFieldsMap} for the key {responseName}; otherwise create the
562561 entry with an empty ordered set.
0 commit comments