Skip to content

Commit b45c0e4

Browse files
committed
Clarify IsNonNullPosition algorithm
1 parent a1563a9 commit b45c0e4

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

spec/Section 5 -- Validation.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1906,11 +1906,11 @@ IsVariableUsageAllowed(variableDefinition, variableUsage):
19061906

19071907
IsNonNullPosition(locationType, variableUsage):
19081908

1909-
- Let {isOneOfField} be {true} if {variableUsage} is located within an
1910-
{ObjectField} entry and the parent type of {ObjectField} is a OneOf Input
1911-
Object; otherwise {false}.
1912-
- If {isOneOfField} is {true} or {locationType} is a non-null type, return
1913-
{true}.
1909+
- If {locationType} is a non-null type, return {true}.
1910+
- If the location of {variableUsage} is an {ObjectField}:
1911+
- Let {parentLocationType} be the expected type of {ObjectField}'s parent
1912+
{ObjectValue}.
1913+
- If {parentLocationType} is a OneOf Input Object type, return {true}.
19141914
- Return {false}.
19151915

19161916
AreTypesCompatible(variableType, locationType):

0 commit comments

Comments
 (0)