Skip to content

Commit 2fdb7fd

Browse files
committed
move variableDefinitions from the common grammar to operations:
it is only needed in for operations and not SDL
1 parent 93b5ddd commit 2fdb7fd

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/main/antlr/GraphqlCommon.g4

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,6 @@ arrayValueWithVariable |
5353
objectValueWithVariable;
5454

5555

56-
variableDefinitions : '(' variableDefinition+ ')';
57-
58-
variableDefinition : variable ':' type defaultValue?;
59-
6056
variable : '$' name;
6157

6258
defaultValue : '=' value;

src/main/antlr/GraphqlOperation.g4

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ operationDefinition:
55
selectionSet |
66
operationType name? variableDefinitions? directives? selectionSet;
77

8+
variableDefinitions : '(' variableDefinition+ ')';
89

10+
variableDefinition : variable ':' type defaultValue?;
911

1012

1113
selectionSet : '{' selection+ '}';
@@ -21,6 +23,7 @@ alias : name ':';
2123

2224

2325

26+
2427
fragmentSpread : '...' fragmentName directives?;
2528

2629
inlineFragment : '...' typeCondition? directives? selectionSet;

0 commit comments

Comments
 (0)