Skip to content

Commit bc4901d

Browse files
committed
[RFC] Allow directives on variable definitions
Redo of #486. Will wait discussion at the next WG meeting.
1 parent 4a70722 commit bc4901d

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

spec/Appendix B -- Grammar Summary.md

Lines changed: 2 additions & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 0 deletions
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)