Skip to content

Commit 760753e

Browse files
mjmahoneleebyron
authored andcommitted
[RFC] Allow directives on variable definitions (#510)
Redo of #486. Will wait discussion at the next WG meeting.
1 parent 1278654 commit 760753e

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

spec/Appendix B -- Grammar Summary.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ ObjectField[Const] : Name : Value[?Const]
162162

163163
VariableDefinitions : ( VariableDefinition+ )
164164

165-
VariableDefinition : Variable : Type DefaultValue?
165+
VariableDefinition : Variable : Type DefaultValue? Directives[Const]?
166166

167167
Variable : $ Name
168168

@@ -296,6 +296,7 @@ ExecutableDirectiveLocation : one of
296296
`FRAGMENT_DEFINITION`
297297
`FRAGMENT_SPREAD`
298298
`INLINE_FRAGMENT`
299+
`VARIABLE_DEFINITION`
299300

300301
TypeSystemDirectiveLocation : one of
301302
`SCHEMA`

spec/Section 2 -- Language.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -986,7 +986,7 @@ Variable : $ Name
986986

987987
VariableDefinitions : ( VariableDefinition+ )
988988

989-
VariableDefinition : Variable : Type DefaultValue?
989+
VariableDefinition : Variable : Type DefaultValue? Directives[Const]?
990990

991991
DefaultValue : = Value[Const]
992992

spec/Section 3 -- Type System.md

+1
Original file line numberDiff line numberDiff line change
@@ -1624,6 +1624,7 @@ ExecutableDirectiveLocation : one of
16241624
`FRAGMENT_DEFINITION`
16251625
`FRAGMENT_SPREAD`
16261626
`INLINE_FRAGMENT`
1627+
`VARIABLE_DEFINITION`
16271628

16281629
TypeSystemDirectiveLocation : one of
16291630
`SCHEMA`

0 commit comments

Comments
 (0)