From 98ffe217ff4fef3a6d20159ac3d96820915fa955 Mon Sep 17 00:00:00 2001 From: mjmahone Date: Sat, 28 Jul 2018 17:21:54 -0400 Subject: [PATCH 1/2] [RFC] Allow directives on variable definitions --- spec/Appendix B -- Grammar Summary.md | 3 ++- spec/Section 2 -- Language.md | 2 +- spec/Section 3 -- Type System.md | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/spec/Appendix B -- Grammar Summary.md b/spec/Appendix B -- Grammar Summary.md index a1783c3bc..5b3c66419 100644 --- a/spec/Appendix B -- Grammar Summary.md +++ b/spec/Appendix B -- Grammar Summary.md @@ -162,7 +162,7 @@ ObjectField[Const] : Name : Value[?Const] VariableDefinitions : ( VariableDefinition+ ) -VariableDefinition : Variable : Type DefaultValue? +VariableDefinition : Variable : Type Directives? DefaultValue? Variable : $ Name @@ -296,6 +296,7 @@ ExecutableDirectiveLocation : one of `FRAGMENT_DEFINITION` `FRAGMENT_SPREAD` `INLINE_FRAGMENT` + `VARIABLE_DEFINITION` TypeSystemDirectiveLocation : one of `SCHEMA` diff --git a/spec/Section 2 -- Language.md b/spec/Section 2 -- Language.md index 012f19b08..63618f29c 100644 --- a/spec/Section 2 -- Language.md +++ b/spec/Section 2 -- Language.md @@ -986,7 +986,7 @@ Variable : $ Name VariableDefinitions : ( VariableDefinition+ ) -VariableDefinition : Variable : Type DefaultValue? +VariableDefinition : Variable : Type Directives? DefaultValue? DefaultValue : = Value[Const] diff --git a/spec/Section 3 -- Type System.md b/spec/Section 3 -- Type System.md index 00bbb8e49..1790dc004 100644 --- a/spec/Section 3 -- Type System.md +++ b/spec/Section 3 -- Type System.md @@ -1624,6 +1624,7 @@ ExecutableDirectiveLocation : one of `FRAGMENT_DEFINITION` `FRAGMENT_SPREAD` `INLINE_FRAGMENT` + `VARIABLE_DEFINITION` TypeSystemDirectiveLocation : one of `SCHEMA` From b7b6a0b3c898b20395d58dd6414465a208fca440 Mon Sep 17 00:00:00 2001 From: mjmahone Date: Sun, 29 Jul 2018 14:34:51 -0400 Subject: [PATCH 2/2] Move to after DefaultValue, and make [Const] --- spec/Appendix B -- Grammar Summary.md | 2 +- spec/Section 2 -- Language.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/Appendix B -- Grammar Summary.md b/spec/Appendix B -- Grammar Summary.md index 5b3c66419..6299a7718 100644 --- a/spec/Appendix B -- Grammar Summary.md +++ b/spec/Appendix B -- Grammar Summary.md @@ -162,7 +162,7 @@ ObjectField[Const] : Name : Value[?Const] VariableDefinitions : ( VariableDefinition+ ) -VariableDefinition : Variable : Type Directives? DefaultValue? +VariableDefinition : Variable : Type DefaultValue? Directives[Const]? Variable : $ Name diff --git a/spec/Section 2 -- Language.md b/spec/Section 2 -- Language.md index 63618f29c..01125d618 100644 --- a/spec/Section 2 -- Language.md +++ b/spec/Section 2 -- Language.md @@ -986,7 +986,7 @@ Variable : $ Name VariableDefinitions : ( VariableDefinition+ ) -VariableDefinition : Variable : Type Directives? DefaultValue? +VariableDefinition : Variable : Type DefaultValue? Directives[Const]? DefaultValue : = Value[Const]