Skip to content

Commit

Permalink
chore: add clarifying note for composite and expand term (#1078)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
JoviDeCroock and benjie committed Jun 6, 2024
1 parent b5ecff0 commit 8076f1e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions spec/Section 5 -- Validation.md
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,8 @@ SameResponseShape(fieldA, fieldB):
- If {typeA} or {typeB} is Scalar or Enum:
- If {typeA} and {typeB} are the same type return {true}, otherwise return
{false}.
- Assert: {typeA} and {typeB} are both composite types.
- Assert: {typeA} is an object, union or interface type.
- Assert: {typeB} is an object, union or interface type.
- Let {mergedSet} be the result of adding the selection set of {fieldA} and the
selection set of {fieldB}.
- Let {fieldsForName} be the set of selections with a given response name in
Expand All @@ -455,6 +456,9 @@ SameResponseShape(fieldA, fieldB):
- If {SameResponseShape(subfieldA, subfieldB)} is {false}, return {false}.
- Return {true}.

Note: In prior versions of the spec the term "composite" was used to signal a
type that is either an Object, Interface or Union type.

**Explanatory Text**

If multiple field selections with the same response names are encountered during
Expand Down Expand Up @@ -910,7 +914,7 @@ fragment inlineNotExistingType on Dog {
}
```

#### Fragments on Composite Types
#### Fragments on Object, Interface or Union Types

**Formal Specification**

Expand Down

0 comments on commit 8076f1e

Please sign in to comment.