Skip to content

Commit

Permalink
Update "Input Field Types Mergeable" rule specification (#108)
Browse files Browse the repository at this point in the history
  • Loading branch information
glen-84 authored Jan 6, 2025
1 parent 65be03d commit a74f8a3
Showing 1 changed file with 1 addition and 17 deletions.
18 changes: 1 addition & 17 deletions spec/Section 4 -- Composition.md
Original file line number Diff line number Diff line change
Expand Up @@ -2950,23 +2950,7 @@ InputFieldsAreMergeable(fields):
- Given each pair of members {fieldA} and {fieldB} in {fields}:
- Let {typeA} be the type of {fieldA}.
- Let {typeB} be the type of {fieldB}.
- {InputTypesAreMergeable(typeA, typeB)} must be true.

InputTypesAreMergeable(typeA, typeB):

- If {typeA} is a non nullable type:
- Set {typeA} to the inner type of {typeA}.
- If {typeB} is a non nullable type:
- Set {typeB} to the inner type of {typeB}.
- If {typeA} is a list type:
- If {typeB} is not list type.
- Return false.
- Let {innerTypeA} be the inner type of {typeA}.
- Let {innerTypeB} be the inner type of {typeB}.
- Return {InputTypesAreMergeable(innerTypeA, innerTypeB)}.
- If {typeA} is equal to {typeB}
- return true
- Otherwise return false.
- {SameTypeShape(typeA, typeB)} must be true.

**Explanatory Text**

Expand Down

0 comments on commit a74f8a3

Please sign in to comment.