Skip to content

Commit 1a96306

Browse files
kitchenSinkQuery: add '@onVariableDefinition' directive (#3177)
1 parent 632c0d8 commit 1a96306

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

src/__testUtils__/kitchenSinkQuery.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ mutation likeStory @onMutation {
2828
}
2929
}
3030
31-
subscription StoryLikeSubscription($input: StoryLikeSubscribeInput)
31+
subscription StoryLikeSubscription(
32+
$input: StoryLikeSubscribeInput @onVariableDefinition
33+
)
3234
@onSubscription {
3335
storyLikeSubscribe(input: $input) {
3436
story {

src/language/__tests__/printer-test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ describe('Printer: Query document', () => {
182182
}
183183
}
184184
185-
subscription StoryLikeSubscription($input: StoryLikeSubscribeInput) @onSubscription {
185+
subscription StoryLikeSubscription($input: StoryLikeSubscribeInput @onVariableDefinition) @onSubscription {
186186
storyLikeSubscribe(input: $input) {
187187
story {
188188
likers {

src/language/__tests__/visitor-test.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -747,6 +747,10 @@ describe('Visitor', () => {
747747
['enter', 'Name', 'name', 'NamedType'],
748748
['leave', 'Name', 'name', 'NamedType'],
749749
['leave', 'NamedType', 'type', 'VariableDefinition'],
750+
['enter', 'Directive', 0, undefined],
751+
['enter', 'Name', 'name', 'Directive'],
752+
['leave', 'Name', 'name', 'Directive'],
753+
['leave', 'Directive', 0, undefined],
750754
['leave', 'VariableDefinition', 0, undefined],
751755
['enter', 'Directive', 0, undefined],
752756
['enter', 'Name', 'name', 'Directive'],

0 commit comments

Comments
 (0)