Skip to content

Commit b61b00d

Browse files
committed
cleanup provides invalid fields
1 parent daa70ab commit b61b00d

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

spec/Section 4 -- Composition.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5776,14 +5776,15 @@ ERROR
57765776
ValidateSelectionSet(selectionSet, parentType):
57775777

57785778
- For each {selection} in {selectionSet}:
5779-
- Let {selectedField} be the field named by {selection} in {parentType}.
5779+
- Let {selectedField} be the field selected by {selection} in {parentType}.
57805780
- If {selectedField} does not exist on {parentType}:
57815781
- return false
5782-
- If {selectedField} returns a composite type then {selection}
5783-
- Let {subSelections} be the selections in {selection}
5784-
- If {subSelections} is empty
5782+
- Let {selectedType} be the type of {selectedField}
5783+
- If {selectedType} is a composite type
5784+
- Let {subSelectionSet} be the selection set of {selection}
5785+
- If {subSelectionSet} is empty
57855786
- return false
5786-
- If {ValidateSelectionSet(subSelections, fieldType)} is false
5787+
- If {ValidateSelectionSet(subSelectionSet, fieldType)} is false
57875788
- return false
57885789
- return true
57895790

0 commit comments

Comments
 (0)