@@ -362,15 +362,15 @@ ExecuteSelectionSet(selectionSet, objectType, objectValue, variableValues):
362362- Let {groupedFieldSet} be the result of {CollectFields(objectType,
363363 selectionSet, variableValues)}.
364364- Initialize {resultMap} to an empty ordered map.
365- - For each {groupedFieldSet} as {responseKey } and {fields}:
365+ - For each {groupedFieldSet} as {responseName } and {fields}:
366366 - Let {fieldName} be the name of the first entry in {fields}. Note: This value
367367 is unaffected if an alias is used.
368368 - Let {fieldType} be the return type defined for the field {fieldName} of
369369 {objectType}.
370370 - If {fieldType} is defined:
371371 - Let {responseValue} be {ExecuteField(objectType, objectValue, fieldType,
372372 fields, variableValues)}.
373- - Set {responseValue} as the value for {responseKey } in {resultMap}.
373+ - Set {responseValue} as the value for {responseName } in {resultMap}.
374374- Return {resultMap}.
375375
376376Note: {resultMap} is ordered by which fields appear first in the operation. This
@@ -496,8 +496,8 @@ A correct executor must generate the following result for that _selection set_:
496496
497497Before execution, the _ selection set_ is converted to a grouped field set by
498498calling {CollectFields()}. Each entry in the grouped field set is a list of
499- fields that share a response key (the alias if defined, otherwise the field
500- name). This ensures all fields with the same response key (including those in
499+ fields that share a _ response name _ (the alias if defined, otherwise the field
500+ name). This ensures all fields with the same response name (including those in
501501referenced fragments) are executed at the same time.
502502
503503As an example, collecting the fields of this selection set would collect two
@@ -539,11 +539,11 @@ CollectFields(objectType, selectionSet, variableValues, visitedFragments):
539539 in {variableValues} with the value {true}, continue with the next
540540 {selection} in {selectionSet}.
541541 - If {selection} is a {Field}:
542- - Let {responseKey } be the response key of {selection} (the alias if
542+ - Let {responseName } be the _ response name _ of {selection} (the alias if
543543 defined, otherwise the field name).
544- - Let {groupForResponseKey } be the list in {groupedFields} for
545- {responseKey }; if no such list exists, create it as an empty list.
546- - Append {selection} to the {groupForResponseKey }.
544+ - Let {groupForResponseName } be the list in {groupedFields} for
545+ {responseName }; if no such list exists, create it as an empty list.
546+ - Append {selection} to the {groupForResponseName }.
547547 - If {selection} is a {FragmentSpread}:
548548 - Let {fragmentSpreadName} be the name of {selection}.
549549 - If {fragmentSpreadName} is in {visitedFragments}, continue with the next
@@ -561,11 +561,11 @@ CollectFields(objectType, selectionSet, variableValues, visitedFragments):
561561 {CollectFields(objectType, fragmentSelectionSet, variableValues,
562562 visitedFragments)}.
563563 - For each {fragmentGroup} in {fragmentGroupedFieldSet}:
564- - Let {responseKey } be the response key shared by all fields in
564+ - Let {responseName } be the response name shared by all fields in
565565 {fragmentGroup}.
566- - Let {groupForResponseKey } be the list in {groupedFields} for
567- {responseKey }; if no such list exists, create it as an empty list.
568- - Append all items in {fragmentGroup} to {groupForResponseKey }.
566+ - Let {groupForResponseName } be the list in {groupedFields} for
567+ {responseName }; if no such list exists, create it as an empty list.
568+ - Append all items in {fragmentGroup} to {groupForResponseName }.
569569 - If {selection} is an {InlineFragment}:
570570 - Let {fragmentType} be the type condition on {selection}.
571571 - If {fragmentType} is not {null} and {DoesFragmentTypeApply(objectType,
@@ -576,11 +576,11 @@ CollectFields(objectType, selectionSet, variableValues, visitedFragments):
576576 {CollectFields(objectType, fragmentSelectionSet, variableValues,
577577 visitedFragments)}.
578578 - For each {fragmentGroup} in {fragmentGroupedFieldSet}:
579- - Let {responseKey } be the response key shared by all fields in
579+ - Let {responseName } be the response name shared by all fields in
580580 {fragmentGroup}.
581- - Let {groupForResponseKey } be the list in {groupedFields} for
582- {responseKey }; if no such list exists, create it as an empty list.
583- - Append all items in {fragmentGroup} to {groupForResponseKey }.
581+ - Let {groupForResponseName } be the list in {groupedFields} for
582+ {responseName }; if no such list exists, create it as an empty list.
583+ - Append all items in {fragmentGroup} to {groupForResponseName }.
584584- Return {groupedFields}.
585585
586586DoesFragmentTypeApply(objectType, fragmentType):
0 commit comments