Skip to content

Commit 213fd2a

Browse files
committed
Define 'grouped field set'
1 parent e8f80c8 commit 213fd2a

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

spec/Section 2 -- Language.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -466,8 +466,9 @@ These two operations are semantically identical:
466466

467467
Alias : Name :
468468

469-
By default a field's response key in the response object will use that field's
470-
name. However, you can define a different response key by specifying an alias.
469+
:: A _response key_ is the key in the response object that correlates with a
470+
field's result. By default the response key will use the field's name; however,
471+
you can define a different response key by specifying an alias.
471472

472473
In this example, we can fetch two profile pictures of different sizes and ensure
473474
the resulting response object will not have duplicate keys:

spec/Section 6 -- Execution.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ Executing the root selection set works similarly for queries (parallel),
347347
mutations (serial), and subscriptions (where it is executed for each event in
348348
the underlying Source Stream).
349349

350-
First, the selection set is turned into a grouped field set; then, we execute
350+
First, the selection set is turned into a _grouped field set_; then, we execute
351351
this grouped field set and return the resulting {data} and {errors}.
352352

353353
ExecuteRootSelectionSet(variableValues, initialValue, objectType, selectionSet,
@@ -365,11 +365,13 @@ serial):
365365

366366
### Field Collection
367367

368-
Before execution, the _selection set_ is converted to a grouped field set by
369-
calling {CollectFields()}. Each entry in the grouped field set is a list of
370-
fields that share a response key (the alias if defined, otherwise the field
371-
name). This ensures all fields with the same response key (including those in
372-
referenced fragments) are executed at the same time.
368+
Before execution, the _selection set_ is converted to a _grouped field set_ by
369+
calling {CollectFields()}.
370+
371+
:: A _grouped field set_ is a map where each entry is a list of field selections
372+
(including those in referenced fragments) that share a _response key_ (the alias
373+
if defined, otherwise the field name). This ensures all fields with the same
374+
_response key_ are executed at the same time.
373375

374376
As an example, collecting the fields of this selection set would collect two
375377
instances of the field `a` and one of field `b`:

0 commit comments

Comments
 (0)