Skip to content

Commit 355fdc1

Browse files
committed
kitchen_sink.grpahql: add @onVariableDefinition directive
Replicates graphql/graphql-js@1a96306
1 parent 3eb73f8 commit 355fdc1

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

tests/fixtures/kitchen_sink.graphql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ mutation likeStory @onMutation {
2828
}
2929

3030
subscription StoryLikeSubscription(
31-
$input: StoryLikeSubscribeInput
31+
$input: StoryLikeSubscribeInput @onVariableDefinition
3232
) @onSubscription {
3333
storyLikeSubscribe(input: $input) {
3434
story {

tests/language/test_printer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ def prints_kitchen_sink_without_altering_ast(kitchen_sink_query): # noqa: F811
168168
}
169169
}
170170
171-
subscription StoryLikeSubscription($input: StoryLikeSubscribeInput) @onSubscription {
171+
subscription StoryLikeSubscription($input: StoryLikeSubscribeInput @onVariableDefinition) @onSubscription {
172172
storyLikeSubscribe(input: $input) {
173173
story {
174174
likers {

tests/language/test_visitor.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -897,6 +897,10 @@ def leave(*args):
897897
["enter", "name", "name", "named_type"],
898898
["leave", "name", "name", "named_type"],
899899
["leave", "named_type", "type", "variable_definition"],
900+
["enter", "directive", 0, None],
901+
["enter", "name", "name", "directive"],
902+
["leave", "name", "name", "directive"],
903+
["leave", "directive", 0, None],
900904
["leave", "variable_definition", 0, None],
901905
["enter", "directive", 0, None],
902906
["enter", "name", "name", "directive"],

0 commit comments

Comments
 (0)