Last active
March 6, 2017 21:47
-
-
Save calebmer/6db3a0f13d0ddb4d1308 to your computer and use it in GitHub Desktop.
GraphQL AST
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| luke: person(id: \"cGVvcGxlOjE=\") { | |
| height | |
| mass | |
| species { | |
| name | |
| classification | |
| } | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "kind": "Document", | |
| "loc": { | |
| "start": 7, | |
| "end": 8 | |
| }, | |
| "definitions": [ | |
| { | |
| "kind": "OperationDefinition", | |
| "loc": { | |
| "start": 7, | |
| "end": 8 | |
| }, | |
| "operation": "query", | |
| "name": null, | |
| "variableDefinitions": null, | |
| "directives": null, | |
| "selectionSet": { | |
| "kind": "SelectionSet", | |
| "loc": { | |
| "start": 7, | |
| "end": 8 | |
| }, | |
| "selections": [ | |
| { | |
| "kind": "Field", | |
| "loc": { | |
| "start": 9, | |
| "end": 10 | |
| }, | |
| "alias": { | |
| "kind": "Name", | |
| "loc": { | |
| "start": 9, | |
| "end": 13 | |
| }, | |
| "value": "luke" | |
| }, | |
| "name": { | |
| "kind": "Name", | |
| "loc": { | |
| "start": 15, | |
| "end": 21 | |
| }, | |
| "value": "person" | |
| }, | |
| "arguments": [ | |
| { | |
| "kind": "Argument", | |
| "loc": { | |
| "start": 22, | |
| "end": 25 | |
| }, | |
| "name": { | |
| "kind": "Name", | |
| "loc": { | |
| "start": 22, | |
| "end": 24 | |
| }, | |
| "value": "id" | |
| }, | |
| "value": { | |
| "kind": "StringValue", | |
| "loc": { | |
| "start": 24, | |
| "end": 25 | |
| }, | |
| "value": "cGVvcGxlOjE=" | |
| } | |
| } | |
| ], | |
| "directives": null, | |
| "selectionSet": { | |
| "kind": "SelectionSet", | |
| "loc": { | |
| "start": 54, | |
| "end": 10 | |
| }, | |
| "selections": [ | |
| { | |
| "kind": "Field", | |
| "loc": { | |
| "start": 11, | |
| "end": 17 | |
| }, | |
| "alias": null, | |
| "name": { | |
| "kind": "Name", | |
| "loc": { | |
| "start": 11, | |
| "end": 17 | |
| }, | |
| "value": "height" | |
| }, | |
| "arguments": null, | |
| "directives": null, | |
| "selectionSet": null | |
| }, | |
| { | |
| "kind": "Field", | |
| "loc": { | |
| "start": 11, | |
| "end": 15 | |
| }, | |
| "alias": null, | |
| "name": { | |
| "kind": "Name", | |
| "loc": { | |
| "start": 11, | |
| "end": 15 | |
| }, | |
| "value": "mass" | |
| }, | |
| "arguments": null, | |
| "directives": null, | |
| "selectionSet": null | |
| }, | |
| { | |
| "kind": "Field", | |
| "loc": { | |
| "start": 11, | |
| "end": 12 | |
| }, | |
| "alias": null, | |
| "name": { | |
| "kind": "Name", | |
| "loc": { | |
| "start": 11, | |
| "end": 18 | |
| }, | |
| "value": "species" | |
| }, | |
| "arguments": null, | |
| "directives": null, | |
| "selectionSet": { | |
| "kind": "SelectionSet", | |
| "loc": { | |
| "start": 19, | |
| "end": 12 | |
| }, | |
| "selections": [ | |
| { | |
| "kind": "Field", | |
| "loc": { | |
| "start": 13, | |
| "end": 17 | |
| }, | |
| "alias": null, | |
| "name": { | |
| "kind": "Name", | |
| "loc": { | |
| "start": 13, | |
| "end": 17 | |
| }, | |
| "value": "name" | |
| }, | |
| "arguments": null, | |
| "directives": null, | |
| "selectionSet": null | |
| }, | |
| { | |
| "kind": "Field", | |
| "loc": { | |
| "start": 13, | |
| "end": 27 | |
| }, | |
| "alias": null, | |
| "name": { | |
| "kind": "Name", | |
| "loc": { | |
| "start": 13, | |
| "end": 27 | |
| }, | |
| "value": "classification" | |
| }, | |
| "arguments": null, | |
| "directives": null, | |
| "selectionSet": null | |
| } | |
| ] | |
| } | |
| } | |
| ] | |
| } | |
| } | |
| ] | |
| } | |
| } | |
| ] | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| query MyQuery($n: Int, $b: Boolean!) { | |
| allPeople(first: $n) { | |
| people { | |
| ...MyPerson | |
| skinColor | |
| ... on Person { | |
| created | |
| edited | |
| } | |
| ... on Person @include(if: $b) { | |
| birthYear | |
| homeworld { | |
| name | |
| diameter | |
| } | |
| } | |
| } | |
| } | |
| } | |
| fragment MyPerson on Person { | |
| name | |
| eyeColor | |
| gender | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "kind": "Document", | |
| "loc": { | |
| "start": 7, | |
| "end": 8 | |
| }, | |
| "definitions": [ | |
| { | |
| "kind": "OperationDefinition", | |
| "loc": { | |
| "start": 7, | |
| "end": 8 | |
| }, | |
| "operation": "query", | |
| "name": { | |
| "kind": "Name", | |
| "loc": { | |
| "start": 13, | |
| "end": 20 | |
| }, | |
| "value": "MyQuery" | |
| }, | |
| "variableDefinitions": [ | |
| { | |
| "kind": "VariableDefinition", | |
| "loc": { | |
| "start": 21, | |
| "end": 28 | |
| }, | |
| "variable": { | |
| "kind": "Variable", | |
| "loc": { | |
| "start": 21, | |
| "end": 23 | |
| }, | |
| "name": { | |
| "kind": "Name", | |
| "loc": { | |
| "start": 21, | |
| "end": 23 | |
| }, | |
| "value": "n" | |
| } | |
| }, | |
| "type": { | |
| "kind": "NamedType", | |
| "loc": { | |
| "start": 25, | |
| "end": 28 | |
| }, | |
| "name": { | |
| "kind": "Name", | |
| "loc": { | |
| "start": 25, | |
| "end": 28 | |
| }, | |
| "value": "Int" | |
| } | |
| }, | |
| "defaultValue": null | |
| }, | |
| { | |
| "kind": "VariableDefinition", | |
| "loc": { | |
| "start": 30, | |
| "end": 42 | |
| }, | |
| "variable": { | |
| "kind": "Variable", | |
| "loc": { | |
| "start": 30, | |
| "end": 32 | |
| }, | |
| "name": { | |
| "kind": "Name", | |
| "loc": { | |
| "start": 30, | |
| "end": 32 | |
| }, | |
| "value": "b" | |
| } | |
| }, | |
| "type": { | |
| "kind": "NonNullType", | |
| "loc": { | |
| "start": 34, | |
| "end": 42 | |
| }, | |
| "type": { | |
| "kind": "NamedType", | |
| "loc": { | |
| "start": 34, | |
| "end": 41 | |
| }, | |
| "name": { | |
| "kind": "Name", | |
| "loc": { | |
| "start": 34, | |
| "end": 41 | |
| }, | |
| "value": "Boolean" | |
| } | |
| } | |
| }, | |
| "defaultValue": null | |
| } | |
| ], | |
| "directives": null, | |
| "selectionSet": { | |
| "kind": "SelectionSet", | |
| "loc": { | |
| "start": 44, | |
| "end": 8 | |
| }, | |
| "selections": [ | |
| { | |
| "kind": "Field", | |
| "loc": { | |
| "start": 9, | |
| "end": 10 | |
| }, | |
| "alias": null, | |
| "name": { | |
| "kind": "Name", | |
| "loc": { | |
| "start": 9, | |
| "end": 18 | |
| }, | |
| "value": "allPeople" | |
| }, | |
| "arguments": [ | |
| { | |
| "kind": "Argument", | |
| "loc": { | |
| "start": 19, | |
| "end": 28 | |
| }, | |
| "name": { | |
| "kind": "Name", | |
| "loc": { | |
| "start": 19, | |
| "end": 24 | |
| }, | |
| "value": "first" | |
| }, | |
| "value": { | |
| "kind": "Variable", | |
| "loc": { | |
| "start": 26, | |
| "end": 28 | |
| }, | |
| "name": { | |
| "kind": "Name", | |
| "loc": { | |
| "start": 26, | |
| "end": 28 | |
| }, | |
| "value": "n" | |
| } | |
| } | |
| } | |
| ], | |
| "directives": null, | |
| "selectionSet": { | |
| "kind": "SelectionSet", | |
| "loc": { | |
| "start": 30, | |
| "end": 10 | |
| }, | |
| "selections": [ | |
| { | |
| "kind": "Field", | |
| "loc": { | |
| "start": 11, | |
| "end": 12 | |
| }, | |
| "alias": null, | |
| "name": { | |
| "kind": "Name", | |
| "loc": { | |
| "start": 11, | |
| "end": 17 | |
| }, | |
| "value": "people" | |
| }, | |
| "arguments": null, | |
| "directives": null, | |
| "selectionSet": { | |
| "kind": "SelectionSet", | |
| "loc": { | |
| "start": 18, | |
| "end": 12 | |
| }, | |
| "selections": [ | |
| { | |
| "kind": "FragmentSpread", | |
| "loc": { | |
| "start": 13, | |
| "end": 24 | |
| }, | |
| "name": { | |
| "kind": "Name", | |
| "loc": { | |
| "start": 16, | |
| "end": 24 | |
| }, | |
| "value": "MyPerson" | |
| }, | |
| "directives": null | |
| }, | |
| { | |
| "kind": "Field", | |
| "loc": { | |
| "start": 13, | |
| "end": 22 | |
| }, | |
| "alias": null, | |
| "name": { | |
| "kind": "Name", | |
| "loc": { | |
| "start": 13, | |
| "end": 22 | |
| }, | |
| "value": "skinColor" | |
| }, | |
| "arguments": null, | |
| "directives": null, | |
| "selectionSet": null | |
| }, | |
| { | |
| "kind": "InlineFragment", | |
| "loc": { | |
| "start": 13, | |
| "end": 14 | |
| }, | |
| "typeCondition": { | |
| "kind": "NamedType", | |
| "loc": { | |
| "start": 20, | |
| "end": 26 | |
| }, | |
| "name": { | |
| "kind": "Name", | |
| "loc": { | |
| "start": 20, | |
| "end": 26 | |
| }, | |
| "value": "Person" | |
| } | |
| }, | |
| "directives": null, | |
| "selectionSet": { | |
| "kind": "SelectionSet", | |
| "loc": { | |
| "start": 27, | |
| "end": 14 | |
| }, | |
| "selections": [ | |
| { | |
| "kind": "Field", | |
| "loc": { | |
| "start": 15, | |
| "end": 22 | |
| }, | |
| "alias": null, | |
| "name": { | |
| "kind": "Name", | |
| "loc": { | |
| "start": 15, | |
| "end": 22 | |
| }, | |
| "value": "created" | |
| }, | |
| "arguments": null, | |
| "directives": null, | |
| "selectionSet": null | |
| }, | |
| { | |
| "kind": "Field", | |
| "loc": { | |
| "start": 15, | |
| "end": 21 | |
| }, | |
| "alias": null, | |
| "name": { | |
| "kind": "Name", | |
| "loc": { | |
| "start": 15, | |
| "end": 21 | |
| }, | |
| "value": "edited" | |
| }, | |
| "arguments": null, | |
| "directives": null, | |
| "selectionSet": null | |
| } | |
| ] | |
| } | |
| }, | |
| { | |
| "kind": "InlineFragment", | |
| "loc": { | |
| "start": 13, | |
| "end": 14 | |
| }, | |
| "typeCondition": { | |
| "kind": "NamedType", | |
| "loc": { | |
| "start": 20, | |
| "end": 26 | |
| }, | |
| "name": { | |
| "kind": "Name", | |
| "loc": { | |
| "start": 20, | |
| "end": 26 | |
| }, | |
| "value": "Person" | |
| } | |
| }, | |
| "directives": [ | |
| { | |
| "kind": "Directive", | |
| "loc": { | |
| "start": 27, | |
| "end": 43 | |
| }, | |
| "name": { | |
| "kind": "Name", | |
| "loc": { | |
| "start": 28, | |
| "end": 35 | |
| }, | |
| "value": "include" | |
| }, | |
| "arguments": [ | |
| { | |
| "kind": "Argument", | |
| "loc": { | |
| "start": 36, | |
| "end": 42 | |
| }, | |
| "name": { | |
| "kind": "Name", | |
| "loc": { | |
| "start": 36, | |
| "end": 38 | |
| }, | |
| "value": "if" | |
| }, | |
| "value": { | |
| "kind": "Variable", | |
| "loc": { | |
| "start": 40, | |
| "end": 42 | |
| }, | |
| "name": { | |
| "kind": "Name", | |
| "loc": { | |
| "start": 40, | |
| "end": 42 | |
| }, | |
| "value": "b" | |
| } | |
| } | |
| } | |
| ] | |
| } | |
| ], | |
| "selectionSet": { | |
| "kind": "SelectionSet", | |
| "loc": { | |
| "start": 44, | |
| "end": 14 | |
| }, | |
| "selections": [ | |
| { | |
| "kind": "Field", | |
| "loc": { | |
| "start": 15, | |
| "end": 24 | |
| }, | |
| "alias": null, | |
| "name": { | |
| "kind": "Name", | |
| "loc": { | |
| "start": 15, | |
| "end": 24 | |
| }, | |
| "value": "birthYear" | |
| }, | |
| "arguments": null, | |
| "directives": null, | |
| "selectionSet": null | |
| }, | |
| { | |
| "kind": "Field", | |
| "loc": { | |
| "start": 15, | |
| "end": 16 | |
| }, | |
| "alias": null, | |
| "name": { | |
| "kind": "Name", | |
| "loc": { | |
| "start": 15, | |
| "end": 24 | |
| }, | |
| "value": "homeworld" | |
| }, | |
| "arguments": null, | |
| "directives": null, | |
| "selectionSet": { | |
| "kind": "SelectionSet", | |
| "loc": { | |
| "start": 25, | |
| "end": 16 | |
| }, | |
| "selections": [ | |
| { | |
| "kind": "Field", | |
| "loc": { | |
| "start": 17, | |
| "end": 21 | |
| }, | |
| "alias": null, | |
| "name": { | |
| "kind": "Name", | |
| "loc": { | |
| "start": 17, | |
| "end": 21 | |
| }, | |
| "value": "name" | |
| }, | |
| "arguments": null, | |
| "directives": null, | |
| "selectionSet": null | |
| }, | |
| { | |
| "kind": "Field", | |
| "loc": { | |
| "start": 17, | |
| "end": 25 | |
| }, | |
| "alias": null, | |
| "name": { | |
| "kind": "Name", | |
| "loc": { | |
| "start": 17, | |
| "end": 25 | |
| }, | |
| "value": "diameter" | |
| }, | |
| "arguments": null, | |
| "directives": null, | |
| "selectionSet": null | |
| } | |
| ] | |
| } | |
| } | |
| ] | |
| } | |
| } | |
| ] | |
| } | |
| } | |
| ] | |
| } | |
| } | |
| ] | |
| } | |
| }, | |
| { | |
| "kind": "FragmentDefinition", | |
| "loc": { | |
| "start": 7, | |
| "end": 8 | |
| }, | |
| "name": { | |
| "kind": "Name", | |
| "loc": { | |
| "start": 16, | |
| "end": 24 | |
| }, | |
| "value": "MyPerson" | |
| }, | |
| "typeCondition": { | |
| "kind": "NamedType", | |
| "loc": { | |
| "start": 28, | |
| "end": 34 | |
| }, | |
| "name": { | |
| "kind": "Name", | |
| "loc": { | |
| "start": 28, | |
| "end": 34 | |
| }, | |
| "value": "Person" | |
| } | |
| }, | |
| "directives": null, | |
| "selectionSet": { | |
| "kind": "SelectionSet", | |
| "loc": { | |
| "start": 35, | |
| "end": 8 | |
| }, | |
| "selections": [ | |
| { | |
| "kind": "Field", | |
| "loc": { | |
| "start": 9, | |
| "end": 13 | |
| }, | |
| "alias": null, | |
| "name": { | |
| "kind": "Name", | |
| "loc": { | |
| "start": 9, | |
| "end": 13 | |
| }, | |
| "value": "name" | |
| }, | |
| "arguments": null, | |
| "directives": null, | |
| "selectionSet": null | |
| }, | |
| { | |
| "kind": "Field", | |
| "loc": { | |
| "start": 9, | |
| "end": 17 | |
| }, | |
| "alias": null, | |
| "name": { | |
| "kind": "Name", | |
| "loc": { | |
| "start": 9, | |
| "end": 17 | |
| }, | |
| "value": "eyeColor" | |
| }, | |
| "arguments": null, | |
| "directives": null, | |
| "selectionSet": null | |
| }, | |
| { | |
| "kind": "Field", | |
| "loc": { | |
| "start": 9, | |
| "end": 15 | |
| }, | |
| "alias": null, | |
| "name": { | |
| "kind": "Name", | |
| "loc": { | |
| "start": 9, | |
| "end": 15 | |
| }, | |
| "value": "gender" | |
| }, | |
| "arguments": null, | |
| "directives": null, | |
| "selectionSet": null | |
| } | |
| ] | |
| } | |
| } | |
| ] | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment