Skip to content

Commit 27e8bee

Browse files
committed
Consistently use 'response key' not 'response name'
1 parent b7c57ea commit 27e8bee

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

spec/Section 5 -- Validation.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -418,9 +418,9 @@ fragment directFieldSelectionOnUnion on CatOrDog {
418418

419419
FieldsInSetCanMerge(set):
420420

421-
- Let {fieldsForName} be the set of selections with a given response name in
422-
{set} including visiting fragments and inline fragments.
423-
- Given each pair of distinct members {fieldA} and {fieldB} in {fieldsForName}:
421+
- Let {fieldsForKey} be the set of selections with a given response key in {set}
422+
including visiting fragments and inline fragments.
423+
- Given each pair of distinct members {fieldA} and {fieldB} in {fieldsForKey}:
424424
- {SameResponseShape(fieldA, fieldB)} must be true.
425425
- If the parent types of {fieldA} and {fieldB} are equal or if either is not
426426
an Object Type:
@@ -450,10 +450,10 @@ SameResponseShape(fieldA, fieldB):
450450
- Assert: {typeB} is an object, union or interface type.
451451
- Let {mergedSet} be the result of adding the selection set of {fieldA} and the
452452
selection set of {fieldB}.
453-
- Let {fieldsForName} be the set of selections with a given response name in
453+
- Let {fieldsForKey} be the set of selections with a given response key in
454454
{mergedSet} including visiting fragments and inline fragments.
455455
- Given each pair of distinct members {subfieldA} and {subfieldB} in
456-
{fieldsForName}:
456+
{fieldsForKey}:
457457
- If {SameResponseShape(subfieldA, subfieldB)} is {false}, return {false}.
458458
- Return {true}.
459459

@@ -462,13 +462,13 @@ type that is either an Object, Interface or Union type.
462462

463463
**Explanatory Text**
464464

465-
If multiple field selections with the same response names are encountered during
465+
If multiple field selections with the same response keys are encountered during
466466
execution, the field and arguments to execute and the resulting value should be
467467
unambiguous. Therefore any two field selections which might both be encountered
468468
for the same object are only valid if they are equivalent.
469469

470470
During execution, the simultaneous execution of fields with the same response
471-
name is accomplished by {MergeSelectionSets()} and {CollectFields()}.
471+
key is accomplished by {MergeSelectionSets()} and {CollectFields()}.
472472

473473
For simple hand-written GraphQL, this rule is obviously a clear developer error,
474474
however nested fragments can make this difficult to detect manually.

0 commit comments

Comments
 (0)