Skip to content

Commit 6536944

Browse files
committed
Split logic for fragment arguments from directive/field arguments
1 parent 6659416 commit 6536944

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

spec/Section 5 -- Validation.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -856,12 +856,20 @@ validation rules apply in each case.
856856

857857
**Formal Specification**
858858

859-
- For each {argument} in the document:
859+
- For each field or directive {argument} in the document:
860860
- Let {argumentName} be the Name of {argument}.
861-
- Let {argumentDefinition} be the argument or variable definition named
862-
{argumentName} provided by the parent field definition, directive definition
863-
or fragment spread.
861+
- Let {argumentDefinition} be the argument definition provided by the parent
862+
field or directive named {argumentName}.
864863
- {argumentDefinition} must exist.
864+
- For each fragment argument {fragmentArgument} in the document:
865+
- Let {variableName} be the Name of {fragmentArgument}.
866+
- Let {namedSpread} be the named spread to which {fragmentArgument} is
867+
applied.
868+
- Let {fragment} be the target of {namedSpread}.
869+
- If no such {fragment} exists, continue with the next {fragmentArgument}.
870+
- Let {variableDefinition} be the variable definition named {variableName}
871+
provided by {fragment}.
872+
- {variableDefinition} must exist.
865873

866874
**Explanatory Text**
867875

0 commit comments

Comments
 (0)