Skip to content

Commit

Permalink
add support for VARIABLE_DEFINITION directive location
Browse files Browse the repository at this point in the history
  • Loading branch information
juancastillo0 committed Oct 25, 2021
1 parent 44ff1a0 commit 07bb75c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions gql/lib/src/ast/ast.dart
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ enum DirectiveLocation {
fragmentDefinition,
fragmentSpread,
inlineFragment,
variableDefinition,
schema,
scalar,
object,
Expand Down
2 changes: 2 additions & 0 deletions gql/lib/src/language/parser.dart
Original file line number Diff line number Diff line change
Expand Up @@ -881,6 +881,8 @@ class _Parser {
return DirectiveLocation.fragmentSpread;
case "INLINE_FRAGMENT":
return DirectiveLocation.inlineFragment;
case "VARIABLE_DEFINITION":
return DirectiveLocation.variableDefinition;
case "SCHEMA":
return DirectiveLocation.schema;
case "SCALAR":
Expand Down
2 changes: 2 additions & 0 deletions gql/lib/src/language/printer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -736,6 +736,8 @@ String? _directiveLocation(DirectiveLocation location) {
return "FRAGMENT_SPREAD";
case DirectiveLocation.inlineFragment:
return "INLINE_FRAGMENT";
case DirectiveLocation.variableDefinition:
return "VARIABLE_DEFINITION";
case DirectiveLocation.schema:
return "SCHEMA";
case DirectiveLocation.scalar:
Expand Down

0 comments on commit 07bb75c

Please sign in to comment.