@@ -450,9 +450,9 @@ A correct executor must generate the following result for that selection set:
450
450
451
451
Before execution, the selection set is converted to a grouped field set by
452
452
calling {CollectFields()}. Each entry in the grouped field set is a list of
453
- fields that share a response key. This ensures all fields with the same response
454
- key (alias or field name) included via referenced fragments are executed at the
455
- same time.
453
+ fields that share a response key (the alias if defined, otherwise the field
454
+ name). This ensures all fields with the same response key included via
455
+ referenced fragments are executed at the same time.
456
456
457
457
As an example, collecting the fields of this selection set would collect two
458
458
instances of the field ` a ` and one of field ` b ` :
@@ -489,7 +489,7 @@ CollectFields(objectType, selectionSet, variableValues, visitedFragments):
489
489
* If {includeDirective}'s {if} argument is not {true} and is not a variable in {variableValues} with the value {true}, continue with the next
490
490
{selection} in {selectionSet}.
491
491
* If {selection} is a {Field}:
492
- * Let {responseKey} be the response key of {selection}.
492
+ * Let {responseKey} be the response key of {selection} (the alias if defined, otherwise the field name) .
493
493
* Let {groupForResponseKey} be the list in {groupedFields} for
494
494
{responseKey}; if no such list exists, create it as an empty list.
495
495
* Append {selection} to the {groupForResponseKey}.
@@ -509,7 +509,7 @@ CollectFields(objectType, selectionSet, variableValues, visitedFragments):
509
509
* Let {fragmentGroupedFieldSet} be the result of calling
510
510
{CollectFields(objectType, fragmentSelectionSet, visitedFragments)}.
511
511
* For each {fragmentGroup} in {fragmentGroupedFieldSet}:
512
- * Let {responseKey} be the response key shared by all fields in {fragmentGroup}
512
+ * Let {responseKey} be the response key shared by all fields in {fragmentGroup}.
513
513
* Let {groupForResponseKey} be the list in {groupedFields} for
514
514
{responseKey}; if no such list exists, create it as an empty list.
515
515
* Append all items in {fragmentGroup} to {groupForResponseKey}.
@@ -520,7 +520,7 @@ CollectFields(objectType, selectionSet, variableValues, visitedFragments):
520
520
* Let {fragmentSelectionSet} be the top-level selection set of {selection}.
521
521
* Let {fragmentGroupedFieldSet} be the result of calling {CollectFields(objectType, fragmentSelectionSet, variableValues, visitedFragments)}.
522
522
* For each {fragmentGroup} in {fragmentGroupedFieldSet}:
523
- * Let {responseKey} be the response key shared by all fields in {fragmentGroup}
523
+ * Let {responseKey} be the response key shared by all fields in {fragmentGroup}.
524
524
* Let {groupForResponseKey} be the list in {groupedFields} for
525
525
{responseKey}; if no such list exists, create it as an empty list.
526
526
* Append all items in {fragmentGroup} to {groupForResponseKey}.
0 commit comments