@@ -50,20 +50,20 @@ The selection set is converted to a grouped field set by calling
5050
5151CollectFields(objectType, selectionSet, visitedFragments):
5252
53- * Initialize {groupedFields} to an empty list of lists.
53+ * Initialize {groupedFields} to an empty ordered list of lists.
5454 * For each {selection} in {selectionSet};
5555 * If {selection} provides the directive ` @skip ` , let {skipDirective} be that directive.
5656 * If {skipDirective}'s {if} argument is {true}, continue with the
5757 next {selection} in {selectionSet}.
5858 * If {selection} provides the directive ` @include ` , let {includeDirective} be that directive.
5959 * If {includeDirective}'s {if} argument is {false}, continue with the
6060 next {selection} in {selectionSet}.
61- * If {selection} is a Field:
61+ * If {selection} is a { Field} :
6262 * Let {responseKey} be the response key of {selection}.
6363 * Let {groupForResponseKey} be the list in {groupedFields} for
6464 {responseKey}; if no such list exists, create it as an empty list.
6565 * Append {selection} to the {groupForResponseKey}.
66- * If {selection} is a FragmentSpread:
66+ * If {selection} is a { FragmentSpread} :
6767 * Let {fragmentSpreadName} be the name of {selection}.
6868 * If {fragmentSpreadName} is in {visitedFragments}, continue with the
6969 next {selection} in {selectionSet}.
@@ -76,20 +76,20 @@ CollectFields(objectType, selectionSet, visitedFragments):
7676 * If {doesFragmentTypeApply(objectType, fragmentType)} is false, continue
7777 with the next {selection} in {selectionSet}.
7878 * Let {fragmentSelectionSet} be the top-level selection set of {fragment}.
79- * Let {fragmentGroupedFields } be the result of calling
80- {CollectFields(objectType, fragmentSelectionSet)}.
81- * For each {fragmentGroup} in {fragmentGroupedFields }:
79+ * Let {fragmentGroupedFieldSet } be the result of calling
80+ {CollectFields(objectType, fragmentSelectionSet, visitedFragments )}.
81+ * For each {fragmentGroup} in {fragmentGroupedFieldSet }:
8282 * Let {responseKey} be the response key shared by all fields in {fragmentGroup}
8383 * Let {groupForResponseKey} be the list in {groupedFields} for
8484 {responseKey}; if no such list exists, create it as an empty list.
8585 * Append all items in {fragmentGroup} to {groupForResponseKey}.
86- * If {selection} is an inline fragment :
86+ * If {selection} is an {InlineFragment} :
8787 * Let {fragmentType} be the type condition on {selection}.
8888 * If {fragmentType} is not {null} and {doesFragmentTypeApply(objectType, fragmentType)} is false, continue
8989 with the next {selection} in {selectionSet}.
9090 * Let {fragmentSelectionSet} be the top-level selection set of {selection}.
91- * Let {fragmentGroupedFields } be the result of calling {CollectFields(objectType, fragmentSelectionSet)}.
92- * For each {fragmentGroup} in {fragmentGroupedFields }:
91+ * Let {fragmentGroupedFieldSet } be the result of calling {CollectFields(objectType, fragmentSelectionSet, visitedFragments )}.
92+ * For each {fragmentGroup} in {fragmentGroupedFieldSet }:
9393 * Let {responseKey} be the response key shared by all fields in {fragmentGroup}
9494 * Let {groupForResponseKey} be the list in {groupedFields} for
9595 {responseKey}; if no such list exists, create it as an empty list.
@@ -112,8 +112,10 @@ it should be evaluated normally.
112112
113113## Evaluating a grouped field set
114114
115- The result of evaluating a grouped field set will be an unordered map. There
116- will be an entry in this map for every item in the grouped field set.
115+ The result of evaluating a grouped field set will be an ordered map. For each
116+ item in the grouped field set, an entry is added to the resulting ordered map,
117+ where the key is the response key shared by all fields for that entry, and the
118+ value is the result of evaluating those fields.
117119
118120### Field entries
119121
0 commit comments