diff --git a/ast/ast.ast b/ast/ast.ast index 9c95732..2cee93a 100644 --- a/ast/ast.ast +++ b/ast/ast.ast @@ -41,6 +41,7 @@ T VariableDefinition S Variable variable S Type type S? Value defaultValue +P? Directive directives T SelectionSet P Selection selections diff --git a/parser.ypp b/parser.ypp index 591e885..eaa1262 100644 --- a/parser.ypp +++ b/parser.ypp @@ -391,7 +391,7 @@ variable: VARIABLE { $$ = new Variable(@$, new Name(@1, strdup($1))); } ; variable_definition: - variable ":" type default_value_opt { $$ = new VariableDefinition(@$, $1, $3, $4); } + variable ":" type default_value_opt directives_opt { $$ = new VariableDefinition(@$, $1, $3, $4, $5); } ; default_value_opt: diff --git a/test/kitchen-sink.graphql b/test/kitchen-sink.graphql index 6fcf394..ccc2a24 100644 --- a/test/kitchen-sink.graphql +++ b/test/kitchen-sink.graphql @@ -57,3 +57,10 @@ fragment frag on Friend { unnamed(truthy: true, falsey: false, nullish: null), query } + +query queryByName($name: String @default(value: 100)) { + findByName(name: $name) { + name + } +} + diff --git a/test/kitchen-sink.json b/test/kitchen-sink.json index 14b93ab..72814a4 100644 --- a/test/kitchen-sink.json +++ b/test/kitchen-sink.json @@ -1 +1 @@ -{"kind":"Document","loc":{"start": {"line": 6,"column":1}, "end": {"line":55,"column":2}},"definitions":[{"kind":"OperationDefinition","loc":{"start": {"line": 6,"column":1}, "end": {"line":25,"column":2}},"operation":"query","name":{"kind":"Name","loc":{"start": {"line": 6,"column":7}, "end": {"line":6,"column":16}},"value":"queryName"},"variableDefinitions":[{"kind":"VariableDefinition","loc":{"start": {"line": 6,"column":17}, "end": {"line":6,"column":34}},"variable":{"kind":"Variable","loc":{"start": {"line": 6,"column":17}, "end": {"line":6,"column":21}},"name":{"kind":"Name","loc":{"start": {"line": 6,"column":17}, "end": {"line":6,"column":21}},"value":"foo"}},"type":{"kind":"NamedType","loc":{"start": {"line": 6,"column":23}, "end": {"line":6,"column":34}},"name":{"kind":"Name","loc":{"start": {"line": 6,"column":23}, "end": {"line":6,"column":34}},"value":"ComplexType"}},"defaultValue":null},{"kind":"VariableDefinition","loc":{"start": {"line": 6,"column":36}, "end": {"line":6,"column":56}},"variable":{"kind":"Variable","loc":{"start": {"line": 6,"column":36}, "end": {"line":6,"column":41}},"name":{"kind":"Name","loc":{"start": {"line": 6,"column":36}, "end": {"line":6,"column":41}},"value":"site"}},"type":{"kind":"NamedType","loc":{"start": {"line": 6,"column":43}, "end": {"line":6,"column":47}},"name":{"kind":"Name","loc":{"start": {"line": 6,"column":43}, "end": {"line":6,"column":47}},"value":"Site"}},"defaultValue":{"kind":"EnumValue","loc":{"start": {"line": 6,"column":50}, "end": {"line":6,"column":56}},"value":"MOBILE"}}],"directives":null,"selectionSet":{"kind":"SelectionSet","loc":{"start": {"line": 6,"column":58}, "end": {"line":25,"column":2}},"selections":[{"kind":"Field","loc":{"start": {"line": 7,"column":3}, "end": {"line":24,"column":4}},"alias":{"kind":"Name","loc":{"start": {"line": 7,"column":3}, "end": {"line":7,"column":15}},"value":"whoever123is"},"name":{"kind":"Name","loc":{"start": {"line": 7,"column":17}, "end": {"line":7,"column":21}},"value":"node"},"arguments":[{"kind":"Argument","loc":{"start": {"line": 7,"column":22}, "end": {"line":7,"column":36}},"name":{"kind":"Name","loc":{"start": {"line": 7,"column":22}, "end": {"line":7,"column":24}},"value":"id"},"value":{"kind":"ListValue","loc":{"start": {"line": 7,"column":26}, "end": {"line":7,"column":36}},"values":[{"kind":"IntValue","loc":{"start": {"line": 7,"column":27}, "end": {"line":7,"column":30}},"value":"123"},{"kind":"IntValue","loc":{"start": {"line": 7,"column":32}, "end": {"line":7,"column":35}},"value":"456"}]}}],"directives":null,"selectionSet":{"kind":"SelectionSet","loc":{"start": {"line": 7,"column":38}, "end": {"line":24,"column":4}},"selections":[{"kind":"Field","loc":{"start": {"line": 8,"column":5}, "end": {"line":8,"column":7}},"alias":null,"name":{"kind":"Name","loc":{"start": {"line": 8,"column":5}, "end": {"line":8,"column":7}},"value":"id"},"arguments":null,"directives":null,"selectionSet":null},{"kind":"InlineFragment","loc":{"start": {"line": 9,"column":5}, "end": {"line":17,"column":6}},"typeCondition":{"kind":"NamedType","loc":{"start": {"line": 9,"column":12}, "end": {"line":9,"column":16}},"name":{"kind":"Name","loc":{"start": {"line": 9,"column":12}, "end": {"line":9,"column":16}},"value":"User"}},"directives":[{"kind":"Directive","loc":{"start": {"line": 9,"column":17}, "end": {"line":9,"column":23}},"name":{"kind":"Name","loc":{"start": {"line": 9,"column":18}, "end": {"line":9,"column":23}},"value":"defer"},"arguments":null}],"selectionSet":{"kind":"SelectionSet","loc":{"start": {"line": 9,"column":24}, "end": {"line":17,"column":6}},"selections":[{"kind":"Field","loc":{"start": {"line": 10,"column":7}, "end": {"line":16,"column":8}},"alias":null,"name":{"kind":"Name","loc":{"start": {"line": 10,"column":7}, "end": {"line":10,"column":13}},"value":"field2"},"arguments":null,"directives":null,"selectionSet":{"kind":"SelectionSet","loc":{"start": {"line": 10,"column":14}, "end": {"line":16,"column":8}},"selections":[{"kind":"Field","loc":{"start": {"line": 11,"column":9}, "end": {"line":11,"column":11}},"alias":null,"name":{"kind":"Name","loc":{"start": {"line": 11,"column":9}, "end": {"line":11,"column":11}},"value":"id"},"arguments":null,"directives":null,"selectionSet":null},{"kind":"Field","loc":{"start": {"line": 12,"column":9}, "end": {"line":15,"column":10}},"alias":{"kind":"Name","loc":{"start": {"line": 12,"column":9}, "end": {"line":12,"column":14}},"value":"alias"},"name":{"kind":"Name","loc":{"start": {"line": 12,"column":16}, "end": {"line":12,"column":22}},"value":"field1"},"arguments":[{"kind":"Argument","loc":{"start": {"line": 12,"column":23}, "end": {"line":12,"column":31}},"name":{"kind":"Name","loc":{"start": {"line": 12,"column":23}, "end": {"line":12,"column":28}},"value":"first"},"value":{"kind":"IntValue","loc":{"start": {"line": 12,"column":29}, "end": {"line":12,"column":31}},"value":"10"}},{"kind":"Argument","loc":{"start": {"line": 12,"column":33}, "end": {"line":12,"column":43}},"name":{"kind":"Name","loc":{"start": {"line": 12,"column":33}, "end": {"line":12,"column":38}},"value":"after"},"value":{"kind":"Variable","loc":{"start": {"line": 12,"column":39}, "end": {"line":12,"column":43}},"name":{"kind":"Name","loc":{"start": {"line": 12,"column":39}, "end": {"line":12,"column":43}},"value":"foo"}}}],"directives":[{"kind":"Directive","loc":{"start": {"line": 12,"column":46}, "end": {"line":12,"column":64}},"name":{"kind":"Name","loc":{"start": {"line": 12,"column":47}, "end": {"line":12,"column":54}},"value":"include"},"arguments":[{"kind":"Argument","loc":{"start": {"line": 12,"column":55}, "end": {"line":12,"column":63}},"name":{"kind":"Name","loc":{"start": {"line": 12,"column":55}, "end": {"line":12,"column":57}},"value":"if"},"value":{"kind":"Variable","loc":{"start": {"line": 12,"column":59}, "end": {"line":12,"column":63}},"name":{"kind":"Name","loc":{"start": {"line": 12,"column":59}, "end": {"line":12,"column":63}},"value":"foo"}}}]}],"selectionSet":{"kind":"SelectionSet","loc":{"start": {"line": 12,"column":65}, "end": {"line":15,"column":10}},"selections":[{"kind":"Field","loc":{"start": {"line": 13,"column":11}, "end": {"line":13,"column":13}},"alias":null,"name":{"kind":"Name","loc":{"start": {"line": 13,"column":11}, "end": {"line":13,"column":13}},"value":"id"},"arguments":null,"directives":null,"selectionSet":null},{"kind":"FragmentSpread","loc":{"start": {"line": 14,"column":11}, "end": {"line":14,"column":18}},"name":{"kind":"Name","loc":{"start": {"line": 14,"column":14}, "end": {"line":14,"column":18}},"value":"frag"},"directives":null}]}}]}}]}},{"kind":"InlineFragment","loc":{"start": {"line": 18,"column":5}, "end": {"line":20,"column":6}},"typeCondition":null,"directives":[{"kind":"Directive","loc":{"start": {"line": 18,"column":9}, "end": {"line":18,"column":28}},"name":{"kind":"Name","loc":{"start": {"line": 18,"column":10}, "end": {"line":18,"column":14}},"value":"skip"},"arguments":[{"kind":"Argument","loc":{"start": {"line": 18,"column":15}, "end": {"line":18,"column":27}},"name":{"kind":"Name","loc":{"start": {"line": 18,"column":15}, "end": {"line":18,"column":21}},"value":"unless"},"value":{"kind":"Variable","loc":{"start": {"line": 18,"column":23}, "end": {"line":18,"column":27}},"name":{"kind":"Name","loc":{"start": {"line": 18,"column":23}, "end": {"line":18,"column":27}},"value":"foo"}}}]}],"selectionSet":{"kind":"SelectionSet","loc":{"start": {"line": 18,"column":29}, "end": {"line":20,"column":6}},"selections":[{"kind":"Field","loc":{"start": {"line": 19,"column":7}, "end": {"line":19,"column":9}},"alias":null,"name":{"kind":"Name","loc":{"start": {"line": 19,"column":7}, "end": {"line":19,"column":9}},"value":"id"},"arguments":null,"directives":null,"selectionSet":null}]}},{"kind":"InlineFragment","loc":{"start": {"line": 21,"column":5}, "end": {"line":23,"column":6}},"typeCondition":null,"directives":null,"selectionSet":{"kind":"SelectionSet","loc":{"start": {"line": 21,"column":9}, "end": {"line":23,"column":6}},"selections":[{"kind":"Field","loc":{"start": {"line": 22,"column":7}, "end": {"line":22,"column":9}},"alias":null,"name":{"kind":"Name","loc":{"start": {"line": 22,"column":7}, "end": {"line":22,"column":9}},"value":"id"},"arguments":null,"directives":null,"selectionSet":null}]}}]}}]}},{"kind":"OperationDefinition","loc":{"start": {"line": 27,"column":1}, "end": {"line":33,"column":2}},"operation":"mutation","name":{"kind":"Name","loc":{"start": {"line": 27,"column":10}, "end": {"line":27,"column":19}},"value":"likeStory"},"variableDefinitions":null,"directives":null,"selectionSet":{"kind":"SelectionSet","loc":{"start": {"line": 27,"column":20}, "end": {"line":33,"column":2}},"selections":[{"kind":"Field","loc":{"start": {"line": 28,"column":3}, "end": {"line":32,"column":4}},"alias":null,"name":{"kind":"Name","loc":{"start": {"line": 28,"column":3}, "end": {"line":28,"column":7}},"value":"like"},"arguments":[{"kind":"Argument","loc":{"start": {"line": 28,"column":8}, "end": {"line":28,"column":18}},"name":{"kind":"Name","loc":{"start": {"line": 28,"column":8}, "end": {"line":28,"column":13}},"value":"story"},"value":{"kind":"IntValue","loc":{"start": {"line": 28,"column":15}, "end": {"line":28,"column":18}},"value":"123"}}],"directives":[{"kind":"Directive","loc":{"start": {"line": 28,"column":20}, "end": {"line":28,"column":26}},"name":{"kind":"Name","loc":{"start": {"line": 28,"column":21}, "end": {"line":28,"column":26}},"value":"defer"},"arguments":null}],"selectionSet":{"kind":"SelectionSet","loc":{"start": {"line": 28,"column":27}, "end": {"line":32,"column":4}},"selections":[{"kind":"Field","loc":{"start": {"line": 29,"column":5}, "end": {"line":31,"column":6}},"alias":null,"name":{"kind":"Name","loc":{"start": {"line": 29,"column":5}, "end": {"line":29,"column":10}},"value":"story"},"arguments":null,"directives":null,"selectionSet":{"kind":"SelectionSet","loc":{"start": {"line": 29,"column":11}, "end": {"line":31,"column":6}},"selections":[{"kind":"Field","loc":{"start": {"line": 30,"column":7}, "end": {"line":30,"column":9}},"alias":null,"name":{"kind":"Name","loc":{"start": {"line": 30,"column":7}, "end": {"line":30,"column":9}},"value":"id"},"arguments":null,"directives":null,"selectionSet":null}]}}]}}]}},{"kind":"OperationDefinition","loc":{"start": {"line": 35,"column":1}, "end": {"line":46,"column":2}},"operation":"subscription","name":{"kind":"Name","loc":{"start": {"line": 35,"column":14}, "end": {"line":35,"column":35}},"value":"StoryLikeSubscription"},"variableDefinitions":[{"kind":"VariableDefinition","loc":{"start": {"line": 35,"column":36}, "end": {"line":35,"column":67}},"variable":{"kind":"Variable","loc":{"start": {"line": 35,"column":36}, "end": {"line":35,"column":42}},"name":{"kind":"Name","loc":{"start": {"line": 35,"column":36}, "end": {"line":35,"column":42}},"value":"input"}},"type":{"kind":"NamedType","loc":{"start": {"line": 35,"column":44}, "end": {"line":35,"column":67}},"name":{"kind":"Name","loc":{"start": {"line": 35,"column":44}, "end": {"line":35,"column":67}},"value":"StoryLikeSubscribeInput"}},"defaultValue":null}],"directives":null,"selectionSet":{"kind":"SelectionSet","loc":{"start": {"line": 35,"column":69}, "end": {"line":46,"column":2}},"selections":[{"kind":"Field","loc":{"start": {"line": 36,"column":3}, "end": {"line":45,"column":4}},"alias":null,"name":{"kind":"Name","loc":{"start": {"line": 36,"column":3}, "end": {"line":36,"column":21}},"value":"storyLikeSubscribe"},"arguments":[{"kind":"Argument","loc":{"start": {"line": 36,"column":22}, "end": {"line":36,"column":35}},"name":{"kind":"Name","loc":{"start": {"line": 36,"column":22}, "end": {"line":36,"column":27}},"value":"input"},"value":{"kind":"Variable","loc":{"start": {"line": 36,"column":29}, "end": {"line":36,"column":35}},"name":{"kind":"Name","loc":{"start": {"line": 36,"column":29}, "end": {"line":36,"column":35}},"value":"input"}}}],"directives":null,"selectionSet":{"kind":"SelectionSet","loc":{"start": {"line": 36,"column":37}, "end": {"line":45,"column":4}},"selections":[{"kind":"Field","loc":{"start": {"line": 37,"column":5}, "end": {"line":44,"column":6}},"alias":null,"name":{"kind":"Name","loc":{"start": {"line": 37,"column":5}, "end": {"line":37,"column":10}},"value":"story"},"arguments":null,"directives":null,"selectionSet":{"kind":"SelectionSet","loc":{"start": {"line": 37,"column":11}, "end": {"line":44,"column":6}},"selections":[{"kind":"Field","loc":{"start": {"line": 38,"column":7}, "end": {"line":40,"column":8}},"alias":null,"name":{"kind":"Name","loc":{"start": {"line": 38,"column":7}, "end": {"line":38,"column":13}},"value":"likers"},"arguments":null,"directives":null,"selectionSet":{"kind":"SelectionSet","loc":{"start": {"line": 38,"column":14}, "end": {"line":40,"column":8}},"selections":[{"kind":"Field","loc":{"start": {"line": 39,"column":9}, "end": {"line":39,"column":14}},"alias":null,"name":{"kind":"Name","loc":{"start": {"line": 39,"column":9}, "end": {"line":39,"column":14}},"value":"count"},"arguments":null,"directives":null,"selectionSet":null}]}},{"kind":"Field","loc":{"start": {"line": 41,"column":7}, "end": {"line":43,"column":8}},"alias":null,"name":{"kind":"Name","loc":{"start": {"line": 41,"column":7}, "end": {"line":41,"column":19}},"value":"likeSentence"},"arguments":null,"directives":null,"selectionSet":{"kind":"SelectionSet","loc":{"start": {"line": 41,"column":20}, "end": {"line":43,"column":8}},"selections":[{"kind":"Field","loc":{"start": {"line": 42,"column":9}, "end": {"line":42,"column":13}},"alias":null,"name":{"kind":"Name","loc":{"start": {"line": 42,"column":9}, "end": {"line":42,"column":13}},"value":"text"},"arguments":null,"directives":null,"selectionSet":null}]}}]}}]}}]}},{"kind":"FragmentDefinition","loc":{"start": {"line": 48,"column":1}, "end": {"line":50,"column":2}},"name":{"kind":"Name","loc":{"start": {"line": 48,"column":10}, "end": {"line":48,"column":14}},"value":"frag"},"typeCondition":{"kind":"NamedType","loc":{"start": {"line": 48,"column":18}, "end": {"line":48,"column":24}},"name":{"kind":"Name","loc":{"start": {"line": 48,"column":18}, "end": {"line":48,"column":24}},"value":"Friend"}},"directives":null,"selectionSet":{"kind":"SelectionSet","loc":{"start": {"line": 48,"column":25}, "end": {"line":50,"column":2}},"selections":[{"kind":"Field","loc":{"start": {"line": 49,"column":3}, "end": {"line":49,"column":98}},"alias":null,"name":{"kind":"Name","loc":{"start": {"line": 49,"column":3}, "end": {"line":49,"column":6}},"value":"foo"},"arguments":[{"kind":"Argument","loc":{"start": {"line": 49,"column":7}, "end": {"line":49,"column":18}},"name":{"kind":"Name","loc":{"start": {"line": 49,"column":7}, "end": {"line":49,"column":11}},"value":"size"},"value":{"kind":"Variable","loc":{"start": {"line": 49,"column":13}, "end": {"line":49,"column":18}},"name":{"kind":"Name","loc":{"start": {"line": 49,"column":13}, "end": {"line":49,"column":18}},"value":"size"}}},{"kind":"Argument","loc":{"start": {"line": 49,"column":20}, "end": {"line":49,"column":27}},"name":{"kind":"Name","loc":{"start": {"line": 49,"column":20}, "end": {"line":49,"column":23}},"value":"bar"},"value":{"kind":"Variable","loc":{"start": {"line": 49,"column":25}, "end": {"line":49,"column":27}},"name":{"kind":"Name","loc":{"start": {"line": 49,"column":25}, "end": {"line":49,"column":27}},"value":"b"}}},{"kind":"Argument","loc":{"start": {"line": 49,"column":29}, "end": {"line":49,"column":97}},"name":{"kind":"Name","loc":{"start": {"line": 49,"column":29}, "end": {"line":49,"column":32}},"value":"obj"},"value":{"kind":"ObjectValue","loc":{"start": {"line": 49,"column":34}, "end": {"line":49,"column":97}},"fields":[{"kind":"ObjectField","loc":{"start": {"line": 49,"column":35}, "end": {"line":49,"column":47}},"name":{"kind":"Name","loc":{"start": {"line": 49,"column":35}, "end": {"line":49,"column":38}},"value":"key"},"value":{"kind":"StringValue","loc":{"start": {"line": 49,"column":40}, "end": {"line":49,"column":47}},"value":"value"}},{"kind":"ObjectField","loc":{"start": {"line": 49,"column":49}, "end": {"line":49,"column":96}},"name":{"kind":"Name","loc":{"start": {"line": 49,"column":49}, "end": {"line":49,"column":54}},"value":"block"},"value":{"kind":"StringValue","loc":{"start": {"line": 49,"column":56}, "end": {"line":49,"column":96}},"value":"block string uses \"\"\""}}]}}],"directives":null,"selectionSet":null}]}},{"kind":"OperationDefinition","loc":{"start": {"line": 52,"column":1}, "end": {"line":55,"column":2}},"operation":"query","name":null,"variableDefinitions":null,"directives":null,"selectionSet":{"kind":"SelectionSet","loc":{"start": {"line": 52,"column":1}, "end": {"line":55,"column":2}},"selections":[{"kind":"Field","loc":{"start": {"line": 53,"column":3}, "end": {"line":53,"column":54}},"alias":null,"name":{"kind":"Name","loc":{"start": {"line": 53,"column":3}, "end": {"line":53,"column":10}},"value":"unnamed"},"arguments":[{"kind":"Argument","loc":{"start": {"line": 53,"column":11}, "end": {"line":53,"column":23}},"name":{"kind":"Name","loc":{"start": {"line": 53,"column":11}, "end": {"line":53,"column":17}},"value":"truthy"},"value":{"kind":"BooleanValue","loc":{"start": {"line": 53,"column":19}, "end": {"line":53,"column":23}},"value":true}},{"kind":"Argument","loc":{"start": {"line": 53,"column":25}, "end": {"line":53,"column":38}},"name":{"kind":"Name","loc":{"start": {"line": 53,"column":25}, "end": {"line":53,"column":31}},"value":"falsey"},"value":{"kind":"BooleanValue","loc":{"start": {"line": 53,"column":33}, "end": {"line":53,"column":38}},"value":false}},{"kind":"Argument","loc":{"start": {"line": 53,"column":40}, "end": {"line":53,"column":53}},"name":{"kind":"Name","loc":{"start": {"line": 53,"column":40}, "end": {"line":53,"column":47}},"value":"nullish"},"value":{"kind":"NullValue","loc":{"start": {"line": 53,"column":49}, "end": {"line":53,"column":53}}}}],"directives":null,"selectionSet":null},{"kind":"Field","loc":{"start": {"line": 54,"column":3}, "end": {"line":54,"column":8}},"alias":null,"name":{"kind":"Name","loc":{"start": {"line": 54,"column":3}, "end": {"line":54,"column":8}},"value":"query"},"arguments":null,"directives":null,"selectionSet":null}]}}]} \ No newline at end of file +{"kind":"Document","loc":{"start": {"line": 6,"column":1}, "end": {"line":61,"column":2}},"definitions":[{"kind":"OperationDefinition","loc":{"start": {"line": 6,"column":1}, "end": {"line":25,"column":2}},"operation":"query","name":{"kind":"Name","loc":{"start": {"line": 6,"column":7}, "end": {"line":6,"column":16}},"value":"queryName"},"variableDefinitions":[{"kind":"VariableDefinition","loc":{"start": {"line": 6,"column":17}, "end": {"line":6,"column":34}},"variable":{"kind":"Variable","loc":{"start": {"line": 6,"column":17}, "end": {"line":6,"column":21}},"name":{"kind":"Name","loc":{"start": {"line": 6,"column":17}, "end": {"line":6,"column":21}},"value":"foo"}},"type":{"kind":"NamedType","loc":{"start": {"line": 6,"column":23}, "end": {"line":6,"column":34}},"name":{"kind":"Name","loc":{"start": {"line": 6,"column":23}, "end": {"line":6,"column":34}},"value":"ComplexType"}},"defaultValue":null,"directives":null},{"kind":"VariableDefinition","loc":{"start": {"line": 6,"column":36}, "end": {"line":6,"column":56}},"variable":{"kind":"Variable","loc":{"start": {"line": 6,"column":36}, "end": {"line":6,"column":41}},"name":{"kind":"Name","loc":{"start": {"line": 6,"column":36}, "end": {"line":6,"column":41}},"value":"site"}},"type":{"kind":"NamedType","loc":{"start": {"line": 6,"column":43}, "end": {"line":6,"column":47}},"name":{"kind":"Name","loc":{"start": {"line": 6,"column":43}, "end": {"line":6,"column":47}},"value":"Site"}},"defaultValue":{"kind":"EnumValue","loc":{"start": {"line": 6,"column":50}, "end": {"line":6,"column":56}},"value":"MOBILE"},"directives":null}],"directives":null,"selectionSet":{"kind":"SelectionSet","loc":{"start": {"line": 6,"column":58}, "end": {"line":25,"column":2}},"selections":[{"kind":"Field","loc":{"start": {"line": 7,"column":3}, "end": {"line":24,"column":4}},"alias":{"kind":"Name","loc":{"start": {"line": 7,"column":3}, "end": {"line":7,"column":15}},"value":"whoever123is"},"name":{"kind":"Name","loc":{"start": {"line": 7,"column":17}, "end": {"line":7,"column":21}},"value":"node"},"arguments":[{"kind":"Argument","loc":{"start": {"line": 7,"column":22}, "end": {"line":7,"column":36}},"name":{"kind":"Name","loc":{"start": {"line": 7,"column":22}, "end": {"line":7,"column":24}},"value":"id"},"value":{"kind":"ListValue","loc":{"start": {"line": 7,"column":26}, "end": {"line":7,"column":36}},"values":[{"kind":"IntValue","loc":{"start": {"line": 7,"column":27}, "end": {"line":7,"column":30}},"value":"123"},{"kind":"IntValue","loc":{"start": {"line": 7,"column":32}, "end": {"line":7,"column":35}},"value":"456"}]}}],"directives":null,"selectionSet":{"kind":"SelectionSet","loc":{"start": {"line": 7,"column":38}, "end": {"line":24,"column":4}},"selections":[{"kind":"Field","loc":{"start": {"line": 8,"column":5}, "end": {"line":8,"column":7}},"alias":null,"name":{"kind":"Name","loc":{"start": {"line": 8,"column":5}, "end": {"line":8,"column":7}},"value":"id"},"arguments":null,"directives":null,"selectionSet":null},{"kind":"InlineFragment","loc":{"start": {"line": 9,"column":5}, "end": {"line":17,"column":6}},"typeCondition":{"kind":"NamedType","loc":{"start": {"line": 9,"column":12}, "end": {"line":9,"column":16}},"name":{"kind":"Name","loc":{"start": {"line": 9,"column":12}, "end": {"line":9,"column":16}},"value":"User"}},"directives":[{"kind":"Directive","loc":{"start": {"line": 9,"column":17}, "end": {"line":9,"column":23}},"name":{"kind":"Name","loc":{"start": {"line": 9,"column":18}, "end": {"line":9,"column":23}},"value":"defer"},"arguments":null}],"selectionSet":{"kind":"SelectionSet","loc":{"start": {"line": 9,"column":24}, "end": {"line":17,"column":6}},"selections":[{"kind":"Field","loc":{"start": {"line": 10,"column":7}, "end": {"line":16,"column":8}},"alias":null,"name":{"kind":"Name","loc":{"start": {"line": 10,"column":7}, "end": {"line":10,"column":13}},"value":"field2"},"arguments":null,"directives":null,"selectionSet":{"kind":"SelectionSet","loc":{"start": {"line": 10,"column":14}, "end": {"line":16,"column":8}},"selections":[{"kind":"Field","loc":{"start": {"line": 11,"column":9}, "end": {"line":11,"column":11}},"alias":null,"name":{"kind":"Name","loc":{"start": {"line": 11,"column":9}, "end": {"line":11,"column":11}},"value":"id"},"arguments":null,"directives":null,"selectionSet":null},{"kind":"Field","loc":{"start": {"line": 12,"column":9}, "end": {"line":15,"column":10}},"alias":{"kind":"Name","loc":{"start": {"line": 12,"column":9}, "end": {"line":12,"column":14}},"value":"alias"},"name":{"kind":"Name","loc":{"start": {"line": 12,"column":16}, "end": {"line":12,"column":22}},"value":"field1"},"arguments":[{"kind":"Argument","loc":{"start": {"line": 12,"column":23}, "end": {"line":12,"column":31}},"name":{"kind":"Name","loc":{"start": {"line": 12,"column":23}, "end": {"line":12,"column":28}},"value":"first"},"value":{"kind":"IntValue","loc":{"start": {"line": 12,"column":29}, "end": {"line":12,"column":31}},"value":"10"}},{"kind":"Argument","loc":{"start": {"line": 12,"column":33}, "end": {"line":12,"column":43}},"name":{"kind":"Name","loc":{"start": {"line": 12,"column":33}, "end": {"line":12,"column":38}},"value":"after"},"value":{"kind":"Variable","loc":{"start": {"line": 12,"column":39}, "end": {"line":12,"column":43}},"name":{"kind":"Name","loc":{"start": {"line": 12,"column":39}, "end": {"line":12,"column":43}},"value":"foo"}}}],"directives":[{"kind":"Directive","loc":{"start": {"line": 12,"column":46}, "end": {"line":12,"column":64}},"name":{"kind":"Name","loc":{"start": {"line": 12,"column":47}, "end": {"line":12,"column":54}},"value":"include"},"arguments":[{"kind":"Argument","loc":{"start": {"line": 12,"column":55}, "end": {"line":12,"column":63}},"name":{"kind":"Name","loc":{"start": {"line": 12,"column":55}, "end": {"line":12,"column":57}},"value":"if"},"value":{"kind":"Variable","loc":{"start": {"line": 12,"column":59}, "end": {"line":12,"column":63}},"name":{"kind":"Name","loc":{"start": {"line": 12,"column":59}, "end": {"line":12,"column":63}},"value":"foo"}}}]}],"selectionSet":{"kind":"SelectionSet","loc":{"start": {"line": 12,"column":65}, "end": {"line":15,"column":10}},"selections":[{"kind":"Field","loc":{"start": {"line": 13,"column":11}, "end": {"line":13,"column":13}},"alias":null,"name":{"kind":"Name","loc":{"start": {"line": 13,"column":11}, "end": {"line":13,"column":13}},"value":"id"},"arguments":null,"directives":null,"selectionSet":null},{"kind":"FragmentSpread","loc":{"start": {"line": 14,"column":11}, "end": {"line":14,"column":18}},"name":{"kind":"Name","loc":{"start": {"line": 14,"column":14}, "end": {"line":14,"column":18}},"value":"frag"},"directives":null}]}}]}}]}},{"kind":"InlineFragment","loc":{"start": {"line": 18,"column":5}, "end": {"line":20,"column":6}},"typeCondition":null,"directives":[{"kind":"Directive","loc":{"start": {"line": 18,"column":9}, "end": {"line":18,"column":28}},"name":{"kind":"Name","loc":{"start": {"line": 18,"column":10}, "end": {"line":18,"column":14}},"value":"skip"},"arguments":[{"kind":"Argument","loc":{"start": {"line": 18,"column":15}, "end": {"line":18,"column":27}},"name":{"kind":"Name","loc":{"start": {"line": 18,"column":15}, "end": {"line":18,"column":21}},"value":"unless"},"value":{"kind":"Variable","loc":{"start": {"line": 18,"column":23}, "end": {"line":18,"column":27}},"name":{"kind":"Name","loc":{"start": {"line": 18,"column":23}, "end": {"line":18,"column":27}},"value":"foo"}}}]}],"selectionSet":{"kind":"SelectionSet","loc":{"start": {"line": 18,"column":29}, "end": {"line":20,"column":6}},"selections":[{"kind":"Field","loc":{"start": {"line": 19,"column":7}, "end": {"line":19,"column":9}},"alias":null,"name":{"kind":"Name","loc":{"start": {"line": 19,"column":7}, "end": {"line":19,"column":9}},"value":"id"},"arguments":null,"directives":null,"selectionSet":null}]}},{"kind":"InlineFragment","loc":{"start": {"line": 21,"column":5}, "end": {"line":23,"column":6}},"typeCondition":null,"directives":null,"selectionSet":{"kind":"SelectionSet","loc":{"start": {"line": 21,"column":9}, "end": {"line":23,"column":6}},"selections":[{"kind":"Field","loc":{"start": {"line": 22,"column":7}, "end": {"line":22,"column":9}},"alias":null,"name":{"kind":"Name","loc":{"start": {"line": 22,"column":7}, "end": {"line":22,"column":9}},"value":"id"},"arguments":null,"directives":null,"selectionSet":null}]}}]}}]}},{"kind":"OperationDefinition","loc":{"start": {"line": 27,"column":1}, "end": {"line":33,"column":2}},"operation":"mutation","name":{"kind":"Name","loc":{"start": {"line": 27,"column":10}, "end": {"line":27,"column":19}},"value":"likeStory"},"variableDefinitions":null,"directives":null,"selectionSet":{"kind":"SelectionSet","loc":{"start": {"line": 27,"column":20}, "end": {"line":33,"column":2}},"selections":[{"kind":"Field","loc":{"start": {"line": 28,"column":3}, "end": {"line":32,"column":4}},"alias":null,"name":{"kind":"Name","loc":{"start": {"line": 28,"column":3}, "end": {"line":28,"column":7}},"value":"like"},"arguments":[{"kind":"Argument","loc":{"start": {"line": 28,"column":8}, "end": {"line":28,"column":18}},"name":{"kind":"Name","loc":{"start": {"line": 28,"column":8}, "end": {"line":28,"column":13}},"value":"story"},"value":{"kind":"IntValue","loc":{"start": {"line": 28,"column":15}, "end": {"line":28,"column":18}},"value":"123"}}],"directives":[{"kind":"Directive","loc":{"start": {"line": 28,"column":20}, "end": {"line":28,"column":26}},"name":{"kind":"Name","loc":{"start": {"line": 28,"column":21}, "end": {"line":28,"column":26}},"value":"defer"},"arguments":null}],"selectionSet":{"kind":"SelectionSet","loc":{"start": {"line": 28,"column":27}, "end": {"line":32,"column":4}},"selections":[{"kind":"Field","loc":{"start": {"line": 29,"column":5}, "end": {"line":31,"column":6}},"alias":null,"name":{"kind":"Name","loc":{"start": {"line": 29,"column":5}, "end": {"line":29,"column":10}},"value":"story"},"arguments":null,"directives":null,"selectionSet":{"kind":"SelectionSet","loc":{"start": {"line": 29,"column":11}, "end": {"line":31,"column":6}},"selections":[{"kind":"Field","loc":{"start": {"line": 30,"column":7}, "end": {"line":30,"column":9}},"alias":null,"name":{"kind":"Name","loc":{"start": {"line": 30,"column":7}, "end": {"line":30,"column":9}},"value":"id"},"arguments":null,"directives":null,"selectionSet":null}]}}]}}]}},{"kind":"OperationDefinition","loc":{"start": {"line": 35,"column":1}, "end": {"line":46,"column":2}},"operation":"subscription","name":{"kind":"Name","loc":{"start": {"line": 35,"column":14}, "end": {"line":35,"column":35}},"value":"StoryLikeSubscription"},"variableDefinitions":[{"kind":"VariableDefinition","loc":{"start": {"line": 35,"column":36}, "end": {"line":35,"column":67}},"variable":{"kind":"Variable","loc":{"start": {"line": 35,"column":36}, "end": {"line":35,"column":42}},"name":{"kind":"Name","loc":{"start": {"line": 35,"column":36}, "end": {"line":35,"column":42}},"value":"input"}},"type":{"kind":"NamedType","loc":{"start": {"line": 35,"column":44}, "end": {"line":35,"column":67}},"name":{"kind":"Name","loc":{"start": {"line": 35,"column":44}, "end": {"line":35,"column":67}},"value":"StoryLikeSubscribeInput"}},"defaultValue":null,"directives":null}],"directives":null,"selectionSet":{"kind":"SelectionSet","loc":{"start": {"line": 35,"column":69}, "end": {"line":46,"column":2}},"selections":[{"kind":"Field","loc":{"start": {"line": 36,"column":3}, "end": {"line":45,"column":4}},"alias":null,"name":{"kind":"Name","loc":{"start": {"line": 36,"column":3}, "end": {"line":36,"column":21}},"value":"storyLikeSubscribe"},"arguments":[{"kind":"Argument","loc":{"start": {"line": 36,"column":22}, "end": {"line":36,"column":35}},"name":{"kind":"Name","loc":{"start": {"line": 36,"column":22}, "end": {"line":36,"column":27}},"value":"input"},"value":{"kind":"Variable","loc":{"start": {"line": 36,"column":29}, "end": {"line":36,"column":35}},"name":{"kind":"Name","loc":{"start": {"line": 36,"column":29}, "end": {"line":36,"column":35}},"value":"input"}}}],"directives":null,"selectionSet":{"kind":"SelectionSet","loc":{"start": {"line": 36,"column":37}, "end": {"line":45,"column":4}},"selections":[{"kind":"Field","loc":{"start": {"line": 37,"column":5}, "end": {"line":44,"column":6}},"alias":null,"name":{"kind":"Name","loc":{"start": {"line": 37,"column":5}, "end": {"line":37,"column":10}},"value":"story"},"arguments":null,"directives":null,"selectionSet":{"kind":"SelectionSet","loc":{"start": {"line": 37,"column":11}, "end": {"line":44,"column":6}},"selections":[{"kind":"Field","loc":{"start": {"line": 38,"column":7}, "end": {"line":40,"column":8}},"alias":null,"name":{"kind":"Name","loc":{"start": {"line": 38,"column":7}, "end": {"line":38,"column":13}},"value":"likers"},"arguments":null,"directives":null,"selectionSet":{"kind":"SelectionSet","loc":{"start": {"line": 38,"column":14}, "end": {"line":40,"column":8}},"selections":[{"kind":"Field","loc":{"start": {"line": 39,"column":9}, "end": {"line":39,"column":14}},"alias":null,"name":{"kind":"Name","loc":{"start": {"line": 39,"column":9}, "end": {"line":39,"column":14}},"value":"count"},"arguments":null,"directives":null,"selectionSet":null}]}},{"kind":"Field","loc":{"start": {"line": 41,"column":7}, "end": {"line":43,"column":8}},"alias":null,"name":{"kind":"Name","loc":{"start": {"line": 41,"column":7}, "end": {"line":41,"column":19}},"value":"likeSentence"},"arguments":null,"directives":null,"selectionSet":{"kind":"SelectionSet","loc":{"start": {"line": 41,"column":20}, "end": {"line":43,"column":8}},"selections":[{"kind":"Field","loc":{"start": {"line": 42,"column":9}, "end": {"line":42,"column":13}},"alias":null,"name":{"kind":"Name","loc":{"start": {"line": 42,"column":9}, "end": {"line":42,"column":13}},"value":"text"},"arguments":null,"directives":null,"selectionSet":null}]}}]}}]}}]}},{"kind":"FragmentDefinition","loc":{"start": {"line": 48,"column":1}, "end": {"line":50,"column":2}},"name":{"kind":"Name","loc":{"start": {"line": 48,"column":10}, "end": {"line":48,"column":14}},"value":"frag"},"typeCondition":{"kind":"NamedType","loc":{"start": {"line": 48,"column":18}, "end": {"line":48,"column":24}},"name":{"kind":"Name","loc":{"start": {"line": 48,"column":18}, "end": {"line":48,"column":24}},"value":"Friend"}},"directives":null,"selectionSet":{"kind":"SelectionSet","loc":{"start": {"line": 48,"column":25}, "end": {"line":50,"column":2}},"selections":[{"kind":"Field","loc":{"start": {"line": 49,"column":3}, "end": {"line":49,"column":98}},"alias":null,"name":{"kind":"Name","loc":{"start": {"line": 49,"column":3}, "end": {"line":49,"column":6}},"value":"foo"},"arguments":[{"kind":"Argument","loc":{"start": {"line": 49,"column":7}, "end": {"line":49,"column":18}},"name":{"kind":"Name","loc":{"start": {"line": 49,"column":7}, "end": {"line":49,"column":11}},"value":"size"},"value":{"kind":"Variable","loc":{"start": {"line": 49,"column":13}, "end": {"line":49,"column":18}},"name":{"kind":"Name","loc":{"start": {"line": 49,"column":13}, "end": {"line":49,"column":18}},"value":"size"}}},{"kind":"Argument","loc":{"start": {"line": 49,"column":20}, "end": {"line":49,"column":27}},"name":{"kind":"Name","loc":{"start": {"line": 49,"column":20}, "end": {"line":49,"column":23}},"value":"bar"},"value":{"kind":"Variable","loc":{"start": {"line": 49,"column":25}, "end": {"line":49,"column":27}},"name":{"kind":"Name","loc":{"start": {"line": 49,"column":25}, "end": {"line":49,"column":27}},"value":"b"}}},{"kind":"Argument","loc":{"start": {"line": 49,"column":29}, "end": {"line":49,"column":97}},"name":{"kind":"Name","loc":{"start": {"line": 49,"column":29}, "end": {"line":49,"column":32}},"value":"obj"},"value":{"kind":"ObjectValue","loc":{"start": {"line": 49,"column":34}, "end": {"line":49,"column":97}},"fields":[{"kind":"ObjectField","loc":{"start": {"line": 49,"column":35}, "end": {"line":49,"column":47}},"name":{"kind":"Name","loc":{"start": {"line": 49,"column":35}, "end": {"line":49,"column":38}},"value":"key"},"value":{"kind":"StringValue","loc":{"start": {"line": 49,"column":40}, "end": {"line":49,"column":47}},"value":"value"}},{"kind":"ObjectField","loc":{"start": {"line": 49,"column":49}, "end": {"line":49,"column":96}},"name":{"kind":"Name","loc":{"start": {"line": 49,"column":49}, "end": {"line":49,"column":54}},"value":"block"},"value":{"kind":"StringValue","loc":{"start": {"line": 49,"column":56}, "end": {"line":49,"column":96}},"value":"block string uses \"\"\""}}]}}],"directives":null,"selectionSet":null}]}},{"kind":"OperationDefinition","loc":{"start": {"line": 52,"column":1}, "end": {"line":55,"column":2}},"operation":"query","name":null,"variableDefinitions":null,"directives":null,"selectionSet":{"kind":"SelectionSet","loc":{"start": {"line": 52,"column":1}, "end": {"line":55,"column":2}},"selections":[{"kind":"Field","loc":{"start": {"line": 53,"column":3}, "end": {"line":53,"column":54}},"alias":null,"name":{"kind":"Name","loc":{"start": {"line": 53,"column":3}, "end": {"line":53,"column":10}},"value":"unnamed"},"arguments":[{"kind":"Argument","loc":{"start": {"line": 53,"column":11}, "end": {"line":53,"column":23}},"name":{"kind":"Name","loc":{"start": {"line": 53,"column":11}, "end": {"line":53,"column":17}},"value":"truthy"},"value":{"kind":"BooleanValue","loc":{"start": {"line": 53,"column":19}, "end": {"line":53,"column":23}},"value":true}},{"kind":"Argument","loc":{"start": {"line": 53,"column":25}, "end": {"line":53,"column":38}},"name":{"kind":"Name","loc":{"start": {"line": 53,"column":25}, "end": {"line":53,"column":31}},"value":"falsey"},"value":{"kind":"BooleanValue","loc":{"start": {"line": 53,"column":33}, "end": {"line":53,"column":38}},"value":false}},{"kind":"Argument","loc":{"start": {"line": 53,"column":40}, "end": {"line":53,"column":53}},"name":{"kind":"Name","loc":{"start": {"line": 53,"column":40}, "end": {"line":53,"column":47}},"value":"nullish"},"value":{"kind":"NullValue","loc":{"start": {"line": 53,"column":49}, "end": {"line":53,"column":53}}}}],"directives":null,"selectionSet":null},{"kind":"Field","loc":{"start": {"line": 54,"column":3}, "end": {"line":54,"column":8}},"alias":null,"name":{"kind":"Name","loc":{"start": {"line": 54,"column":3}, "end": {"line":54,"column":8}},"value":"query"},"arguments":null,"directives":null,"selectionSet":null}]}},{"kind":"OperationDefinition","loc":{"start": {"line": 57,"column":1}, "end": {"line":61,"column":2}},"operation":"query","name":{"kind":"Name","loc":{"start": {"line": 57,"column":7}, "end": {"line":57,"column":18}},"value":"queryByName"},"variableDefinitions":[{"kind":"VariableDefinition","loc":{"start": {"line": 57,"column":19}, "end": {"line":57,"column":53}},"variable":{"kind":"Variable","loc":{"start": {"line": 57,"column":19}, "end": {"line":57,"column":24}},"name":{"kind":"Name","loc":{"start": {"line": 57,"column":19}, "end": {"line":57,"column":24}},"value":"name"}},"type":{"kind":"NamedType","loc":{"start": {"line": 57,"column":26}, "end": {"line":57,"column":32}},"name":{"kind":"Name","loc":{"start": {"line": 57,"column":26}, "end": {"line":57,"column":32}},"value":"String"}},"defaultValue":null,"directives":[{"kind":"Directive","loc":{"start": {"line": 57,"column":33}, "end": {"line":57,"column":53}},"name":{"kind":"Name","loc":{"start": {"line": 57,"column":34}, "end": {"line":57,"column":41}},"value":"default"},"arguments":[{"kind":"Argument","loc":{"start": {"line": 57,"column":42}, "end": {"line":57,"column":52}},"name":{"kind":"Name","loc":{"start": {"line": 57,"column":42}, "end": {"line":57,"column":47}},"value":"value"},"value":{"kind":"IntValue","loc":{"start": {"line": 57,"column":49}, "end": {"line":57,"column":52}},"value":"100"}}]}]}],"directives":null,"selectionSet":{"kind":"SelectionSet","loc":{"start": {"line": 57,"column":55}, "end": {"line":61,"column":2}},"selections":[{"kind":"Field","loc":{"start": {"line": 58,"column":3}, "end": {"line":60,"column":4}},"alias":null,"name":{"kind":"Name","loc":{"start": {"line": 58,"column":3}, "end": {"line":58,"column":13}},"value":"findByName"},"arguments":[{"kind":"Argument","loc":{"start": {"line": 58,"column":14}, "end": {"line":58,"column":25}},"name":{"kind":"Name","loc":{"start": {"line": 58,"column":14}, "end": {"line":58,"column":18}},"value":"name"},"value":{"kind":"Variable","loc":{"start": {"line": 58,"column":20}, "end": {"line":58,"column":25}},"name":{"kind":"Name","loc":{"start": {"line": 58,"column":20}, "end": {"line":58,"column":25}},"value":"name"}}}],"directives":null,"selectionSet":{"kind":"SelectionSet","loc":{"start": {"line": 58,"column":27}, "end": {"line":60,"column":4}},"selections":[{"kind":"Field","loc":{"start": {"line": 59,"column":5}, "end": {"line":59,"column":9}},"alias":null,"name":{"kind":"Name","loc":{"start": {"line": 59,"column":5}, "end": {"line":59,"column":9}},"value":"name"},"arguments":null,"directives":null,"selectionSet":null}]}}]}}]} \ No newline at end of file