Skip to content

Commit 8076f1e

Browse files
JoviDeCroockbenjie
andauthored
chore: add clarifying note for composite and expand term (#1078)
* remove mentions of composite * Apply suggestions from code review Co-authored-by: Benjie <benjie@jemjie.com> * add note * Capitalise first letter in note block * remove the term and alter the wording * typo * Update spec/Section 5 -- Validation.md Co-authored-by: Benjie <benjie@jemjie.com> * Update spec/Section 5 -- Validation.md Co-authored-by: Benjie <benjie@jemjie.com> * Update spec/Section 5 -- Validation.md Co-authored-by: Benjie <benjie@jemjie.com> --------- Co-authored-by: Benjie <benjie@jemjie.com>
1 parent b5ecff0 commit 8076f1e

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

spec/Section 5 -- Validation.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,8 @@ SameResponseShape(fieldA, fieldB):
446446
- If {typeA} or {typeB} is Scalar or Enum:
447447
- If {typeA} and {typeB} are the same type return {true}, otherwise return
448448
{false}.
449-
- Assert: {typeA} and {typeB} are both composite types.
449+
- Assert: {typeA} is an object, union or interface type.
450+
- Assert: {typeB} is an object, union or interface type.
450451
- Let {mergedSet} be the result of adding the selection set of {fieldA} and the
451452
selection set of {fieldB}.
452453
- Let {fieldsForName} be the set of selections with a given response name in
@@ -455,6 +456,9 @@ SameResponseShape(fieldA, fieldB):
455456
- If {SameResponseShape(subfieldA, subfieldB)} is {false}, return {false}.
456457
- Return {true}.
457458

459+
Note: In prior versions of the spec the term "composite" was used to signal a
460+
type that is either an Object, Interface or Union type.
461+
458462
**Explanatory Text**
459463

460464
If multiple field selections with the same response names are encountered during
@@ -910,7 +914,7 @@ fragment inlineNotExistingType on Dog {
910914
}
911915
```
912916

913-
#### Fragments on Composite Types
917+
#### Fragments on Object, Interface or Union Types
914918

915919
**Formal Specification**
916920

0 commit comments

Comments
 (0)