Skip to content

Commit

Permalink
kitchenSinkQuery: add '@onVariableDefinition' directive (#3177)
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanGoncharov committed Jun 14, 2021
1 parent 632c0d8 commit 1a96306
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/__testUtils__/kitchenSinkQuery.ts
Expand Up @@ -28,7 +28,9 @@ mutation likeStory @onMutation {
}
}
subscription StoryLikeSubscription($input: StoryLikeSubscribeInput)
subscription StoryLikeSubscription(
$input: StoryLikeSubscribeInput @onVariableDefinition
)
@onSubscription {
storyLikeSubscribe(input: $input) {
story {
Expand Down
2 changes: 1 addition & 1 deletion src/language/__tests__/printer-test.ts
Expand Up @@ -182,7 +182,7 @@ describe('Printer: Query document', () => {
}
}
subscription StoryLikeSubscription($input: StoryLikeSubscribeInput) @onSubscription {
subscription StoryLikeSubscription($input: StoryLikeSubscribeInput @onVariableDefinition) @onSubscription {
storyLikeSubscribe(input: $input) {
story {
likers {
Expand Down
4 changes: 4 additions & 0 deletions src/language/__tests__/visitor-test.ts
Expand Up @@ -747,6 +747,10 @@ describe('Visitor', () => {
['enter', 'Name', 'name', 'NamedType'],
['leave', 'Name', 'name', 'NamedType'],
['leave', 'NamedType', 'type', 'VariableDefinition'],
['enter', 'Directive', 0, undefined],
['enter', 'Name', 'name', 'Directive'],
['leave', 'Name', 'name', 'Directive'],
['leave', 'Directive', 0, undefined],
['leave', 'VariableDefinition', 0, undefined],
['enter', 'Directive', 0, undefined],
['enter', 'Name', 'name', 'Directive'],
Expand Down

0 comments on commit 1a96306

Please sign in to comment.