summaryrefslogtreecommitdiff
path: root/tests/examplefiles
diff options
context:
space:
mode:
Diffstat (limited to 'tests/examplefiles')
-rw-r--r--tests/examplefiles/graphql/ex01_field1.graphql5
-rw-r--r--tests/examplefiles/graphql/ex01_field1.graphql.output13
-rw-r--r--tests/examplefiles/graphql/ex02_field2.graphql9
-rw-r--r--tests/examplefiles/graphql/ex02_field2.graphql.output23
-rw-r--r--tests/examplefiles/graphql/ex03_arguments1.graphql6
-rw-r--r--tests/examplefiles/graphql/ex03_arguments1.graphql.output23
-rw-r--r--tests/examplefiles/graphql/ex04_arguments2.graphql6
-rw-r--r--tests/examplefiles/graphql/ex04_arguments2.graphql.output29
-rw-r--r--tests/examplefiles/graphql/ex05_aliases.graphql8
-rw-r--r--tests/examplefiles/graphql/ex05_aliases.graphql.output39
-rw-r--r--tests/examplefiles/graphql/ex06_fragments1.graphql16
-rw-r--r--tests/examplefiles/graphql/ex06_fragments1.graphql.output67
-rw-r--r--tests/examplefiles/graphql/ex07_fragments2.graphql20
-rw-r--r--tests/examplefiles/graphql/ex07_fragments2.graphql.output99
-rw-r--r--tests/examplefiles/graphql/ex08_operation_name.graphql8
-rw-r--r--tests/examplefiles/graphql/ex08_operation_name.graphql.output25
-rw-r--r--tests/examplefiles/graphql/ex09_variables1.graphql8
-rw-r--r--tests/examplefiles/graphql/ex09_variables1.graphql.output37
-rw-r--r--tests/examplefiles/graphql/ex10_variables2.graphql8
-rw-r--r--tests/examplefiles/graphql/ex10_variables2.graphql.output41
-rw-r--r--tests/examplefiles/graphql/ex11_directives.graphql8
-rw-r--r--tests/examplefiles/graphql/ex11_directives.graphql.output52
-rw-r--r--tests/examplefiles/graphql/ex12_mutations.graphql6
-rw-r--r--tests/examplefiles/graphql/ex12_mutations.graphql.output45
-rw-r--r--tests/examplefiles/graphql/ex13_inline_fragments1.graphql11
-rw-r--r--tests/examplefiles/graphql/ex13_inline_fragments1.graphql.output54
-rw-r--r--tests/examplefiles/graphql/ex14_inline_fragments2.graphql14
-rw-r--r--tests/examplefiles/graphql/ex14_inline_fragments2.graphql.output57
28 files changed, 737 insertions, 0 deletions
diff --git a/tests/examplefiles/graphql/ex01_field1.graphql b/tests/examplefiles/graphql/ex01_field1.graphql
new file mode 100644
index 00000000..d4aef93a
--- /dev/null
+++ b/tests/examplefiles/graphql/ex01_field1.graphql
@@ -0,0 +1,5 @@
+{
+ hero {
+ name
+ }
+}
diff --git a/tests/examplefiles/graphql/ex01_field1.graphql.output b/tests/examplefiles/graphql/ex01_field1.graphql.output
new file mode 100644
index 00000000..ae18503a
--- /dev/null
+++ b/tests/examplefiles/graphql/ex01_field1.graphql.output
@@ -0,0 +1,13 @@
+'{' Punctuation
+'\n ' Text.Whitespace
+'hero' Name
+' ' Text.Whitespace
+'{' Punctuation
+'\n ' Text.Whitespace
+'name' Name
+'\n ' Text.Whitespace
+'}' Punctuation
+'\n' Text.Whitespace
+
+'}' Punctuation
+'\n' Text.Whitespace
diff --git a/tests/examplefiles/graphql/ex02_field2.graphql b/tests/examplefiles/graphql/ex02_field2.graphql
new file mode 100644
index 00000000..68f1695b
--- /dev/null
+++ b/tests/examplefiles/graphql/ex02_field2.graphql
@@ -0,0 +1,9 @@
+{
+ hero {
+ name
+ # Queries can have comments!
+ friends {
+ name
+ }
+ }
+}
diff --git a/tests/examplefiles/graphql/ex02_field2.graphql.output b/tests/examplefiles/graphql/ex02_field2.graphql.output
new file mode 100644
index 00000000..dcdb8cc9
--- /dev/null
+++ b/tests/examplefiles/graphql/ex02_field2.graphql.output
@@ -0,0 +1,23 @@
+'{' Punctuation
+'\n ' Text.Whitespace
+'hero' Name
+' ' Text.Whitespace
+'{' Punctuation
+'\n ' Text.Whitespace
+'name' Name
+'\n ' Text.Whitespace
+'# Queries can have comments!' Comment
+'\n ' Text.Whitespace
+'friends' Name
+' ' Text.Whitespace
+'{' Punctuation
+'\n ' Text.Whitespace
+'name' Name
+'\n ' Text.Whitespace
+'}' Punctuation
+'\n ' Text.Whitespace
+'}' Punctuation
+'\n' Text.Whitespace
+
+'}' Punctuation
+'\n' Text.Whitespace
diff --git a/tests/examplefiles/graphql/ex03_arguments1.graphql b/tests/examplefiles/graphql/ex03_arguments1.graphql
new file mode 100644
index 00000000..e46bcbe2
--- /dev/null
+++ b/tests/examplefiles/graphql/ex03_arguments1.graphql
@@ -0,0 +1,6 @@
+{
+ human(id: "1000") {
+ name
+ height
+ }
+}
diff --git a/tests/examplefiles/graphql/ex03_arguments1.graphql.output b/tests/examplefiles/graphql/ex03_arguments1.graphql.output
new file mode 100644
index 00000000..78f86964
--- /dev/null
+++ b/tests/examplefiles/graphql/ex03_arguments1.graphql.output
@@ -0,0 +1,23 @@
+'{' Punctuation
+'\n ' Text.Whitespace
+'human' Name
+'(' Punctuation
+'id' Name
+':' Punctuation
+' ' Text.Whitespace
+'"' Literal.String
+'1000' Literal.String
+'"' Literal.String
+')' Punctuation
+' ' Text.Whitespace
+'{' Punctuation
+'\n ' Text.Whitespace
+'name' Name
+'\n ' Text.Whitespace
+'height' Name
+'\n ' Text.Whitespace
+'}' Punctuation
+'\n' Text.Whitespace
+
+'}' Punctuation
+'\n' Text.Whitespace
diff --git a/tests/examplefiles/graphql/ex04_arguments2.graphql b/tests/examplefiles/graphql/ex04_arguments2.graphql
new file mode 100644
index 00000000..f406f637
--- /dev/null
+++ b/tests/examplefiles/graphql/ex04_arguments2.graphql
@@ -0,0 +1,6 @@
+{
+ human(id: "1000") {
+ name
+ height(unit: FOOT)
+ }
+}
diff --git a/tests/examplefiles/graphql/ex04_arguments2.graphql.output b/tests/examplefiles/graphql/ex04_arguments2.graphql.output
new file mode 100644
index 00000000..472a2ed8
--- /dev/null
+++ b/tests/examplefiles/graphql/ex04_arguments2.graphql.output
@@ -0,0 +1,29 @@
+'{' Punctuation
+'\n ' Text.Whitespace
+'human' Name
+'(' Punctuation
+'id' Name
+':' Punctuation
+' ' Text.Whitespace
+'"' Literal.String
+'1000' Literal.String
+'"' Literal.String
+')' Punctuation
+' ' Text.Whitespace
+'{' Punctuation
+'\n ' Text.Whitespace
+'name' Name
+'\n ' Text.Whitespace
+'height' Name
+'(' Punctuation
+'unit' Name
+':' Punctuation
+' ' Text.Whitespace
+'FOOT' Name.Constant
+')' Punctuation
+'\n ' Text.Whitespace
+'}' Punctuation
+'\n' Text.Whitespace
+
+'}' Punctuation
+'\n' Text.Whitespace
diff --git a/tests/examplefiles/graphql/ex05_aliases.graphql b/tests/examplefiles/graphql/ex05_aliases.graphql
new file mode 100644
index 00000000..a21db69e
--- /dev/null
+++ b/tests/examplefiles/graphql/ex05_aliases.graphql
@@ -0,0 +1,8 @@
+{
+ empireHero: hero(episode: EMPIRE) {
+ name
+ }
+ jediHero: hero(episode: JEDI) {
+ name
+ }
+}
diff --git a/tests/examplefiles/graphql/ex05_aliases.graphql.output b/tests/examplefiles/graphql/ex05_aliases.graphql.output
new file mode 100644
index 00000000..1f4dcead
--- /dev/null
+++ b/tests/examplefiles/graphql/ex05_aliases.graphql.output
@@ -0,0 +1,39 @@
+'{' Punctuation
+'\n ' Text.Whitespace
+'empireHero' Name.Label
+':' Punctuation
+' ' Text.Whitespace
+'hero' Name
+'(' Punctuation
+'episode' Name
+':' Punctuation
+' ' Text.Whitespace
+'EMPIRE' Name.Constant
+')' Punctuation
+' ' Text.Whitespace
+'{' Punctuation
+'\n ' Text.Whitespace
+'name' Name
+'\n ' Text.Whitespace
+'}' Punctuation
+'\n ' Text.Whitespace
+'jediHero' Name.Label
+':' Punctuation
+' ' Text.Whitespace
+'hero' Name
+'(' Punctuation
+'episode' Name
+':' Punctuation
+' ' Text.Whitespace
+'JEDI' Name.Constant
+')' Punctuation
+' ' Text.Whitespace
+'{' Punctuation
+'\n ' Text.Whitespace
+'name' Name
+'\n ' Text.Whitespace
+'}' Punctuation
+'\n' Text.Whitespace
+
+'}' Punctuation
+'\n' Text.Whitespace
diff --git a/tests/examplefiles/graphql/ex06_fragments1.graphql b/tests/examplefiles/graphql/ex06_fragments1.graphql
new file mode 100644
index 00000000..7c2783e7
--- /dev/null
+++ b/tests/examplefiles/graphql/ex06_fragments1.graphql
@@ -0,0 +1,16 @@
+{
+ leftComparison: hero(episode: EMPIRE) {
+ ...comparisonFields
+ }
+ rightComparison: hero(episode: JEDI) {
+ ...comparisonFields
+ }
+}
+
+fragment comparisonFields on Character {
+ name
+ appearsIn
+ friends {
+ name
+ }
+}
diff --git a/tests/examplefiles/graphql/ex06_fragments1.graphql.output b/tests/examplefiles/graphql/ex06_fragments1.graphql.output
new file mode 100644
index 00000000..76c0af07
--- /dev/null
+++ b/tests/examplefiles/graphql/ex06_fragments1.graphql.output
@@ -0,0 +1,67 @@
+'{' Punctuation
+'\n ' Text.Whitespace
+'leftComparison' Name.Label
+':' Punctuation
+' ' Text.Whitespace
+'hero' Name
+'(' Punctuation
+'episode' Name
+':' Punctuation
+' ' Text.Whitespace
+'EMPIRE' Name.Constant
+')' Punctuation
+' ' Text.Whitespace
+'{' Punctuation
+'\n ' Text.Whitespace
+'...' Punctuation
+'comparisonFields' Name
+'\n ' Text.Whitespace
+'}' Punctuation
+'\n ' Text.Whitespace
+'rightComparison' Name.Label
+':' Punctuation
+' ' Text.Whitespace
+'hero' Name
+'(' Punctuation
+'episode' Name
+':' Punctuation
+' ' Text.Whitespace
+'JEDI' Name.Constant
+')' Punctuation
+' ' Text.Whitespace
+'{' Punctuation
+'\n ' Text.Whitespace
+'...' Punctuation
+'comparisonFields' Name
+'\n ' Text.Whitespace
+'}' Punctuation
+'\n' Text.Whitespace
+
+'}' Punctuation
+'\n\n' Text.Whitespace
+
+'fragment' Keyword
+' ' Text.Whitespace
+'comparisonFields' Name.Function
+' ' Text.Whitespace
+'on' Keyword
+' ' Text.Whitespace
+'Character' Name.Class
+' ' Text.Whitespace
+'{' Punctuation
+'\n ' Text.Whitespace
+'name' Name
+'\n ' Text.Whitespace
+'appearsIn' Name
+'\n ' Text.Whitespace
+'friends' Name
+' ' Text.Whitespace
+'{' Punctuation
+'\n ' Text.Whitespace
+'name' Name
+'\n ' Text.Whitespace
+'}' Punctuation
+'\n' Text.Whitespace
+
+'}' Punctuation
+'\n' Text.Whitespace
diff --git a/tests/examplefiles/graphql/ex07_fragments2.graphql b/tests/examplefiles/graphql/ex07_fragments2.graphql
new file mode 100644
index 00000000..f9294954
--- /dev/null
+++ b/tests/examplefiles/graphql/ex07_fragments2.graphql
@@ -0,0 +1,20 @@
+query HeroComparison($first: Int = 3) {
+ leftComparison: hero(episode: EMPIRE) {
+ ...comparisonFields
+ }
+ rightComparison: hero(episode: JEDI) {
+ ...comparisonFields
+ }
+}
+
+fragment comparisonFields on Character {
+ name
+ friendsConnection(first: $first) {
+ totalCount
+ edges {
+ node {
+ name
+ }
+ }
+ }
+}
diff --git a/tests/examplefiles/graphql/ex07_fragments2.graphql.output b/tests/examplefiles/graphql/ex07_fragments2.graphql.output
new file mode 100644
index 00000000..2ee8e6cd
--- /dev/null
+++ b/tests/examplefiles/graphql/ex07_fragments2.graphql.output
@@ -0,0 +1,99 @@
+'query' Keyword
+' ' Text.Whitespace
+'HeroComparison' Name.Function
+'(' Punctuation
+'$first' Name.Variable
+':' Punctuation
+' ' Text.Whitespace
+'Int' Name.Builtin
+' ' Text.Whitespace
+'=' Punctuation
+' ' Text.Whitespace
+'3' Literal.Number.Integer
+')' Punctuation
+' ' Text.Whitespace
+'{' Punctuation
+'\n ' Text.Whitespace
+'leftComparison' Name.Label
+':' Punctuation
+' ' Text.Whitespace
+'hero' Name
+'(' Punctuation
+'episode' Name
+':' Punctuation
+' ' Text.Whitespace
+'EMPIRE' Name.Constant
+')' Punctuation
+' ' Text.Whitespace
+'{' Punctuation
+'\n ' Text.Whitespace
+'...' Punctuation
+'comparisonFields' Name
+'\n ' Text.Whitespace
+'}' Punctuation
+'\n ' Text.Whitespace
+'rightComparison' Name.Label
+':' Punctuation
+' ' Text.Whitespace
+'hero' Name
+'(' Punctuation
+'episode' Name
+':' Punctuation
+' ' Text.Whitespace
+'JEDI' Name.Constant
+')' Punctuation
+' ' Text.Whitespace
+'{' Punctuation
+'\n ' Text.Whitespace
+'...' Punctuation
+'comparisonFields' Name
+'\n ' Text.Whitespace
+'}' Punctuation
+'\n' Text.Whitespace
+
+'}' Punctuation
+'\n\n' Text.Whitespace
+
+'fragment' Keyword
+' ' Text.Whitespace
+'comparisonFields' Name.Function
+' ' Text.Whitespace
+'on' Keyword
+' ' Text.Whitespace
+'Character' Name.Class
+' ' Text.Whitespace
+'{' Punctuation
+'\n ' Text.Whitespace
+'name' Name
+'\n ' Text.Whitespace
+'friendsConnection' Name
+'(' Punctuation
+'first' Name
+':' Punctuation
+' ' Text.Whitespace
+'$first' Name.Variable
+')' Punctuation
+' ' Text.Whitespace
+'{' Punctuation
+'\n ' Text.Whitespace
+'totalCount' Name
+'\n ' Text.Whitespace
+'edges' Name
+' ' Text.Whitespace
+'{' Punctuation
+'\n ' Text.Whitespace
+'node' Name
+' ' Text.Whitespace
+'{' Punctuation
+'\n ' Text.Whitespace
+'name' Name
+'\n ' Text.Whitespace
+'}' Punctuation
+'\n ' Text.Whitespace
+'}' Punctuation
+'\n ' Text.Whitespace
+'}' Punctuation
+'\n' Text.Whitespace
+
+'}' Punctuation
+'\n' Text.Whitespace
diff --git a/tests/examplefiles/graphql/ex08_operation_name.graphql b/tests/examplefiles/graphql/ex08_operation_name.graphql
new file mode 100644
index 00000000..13c21a62
--- /dev/null
+++ b/tests/examplefiles/graphql/ex08_operation_name.graphql
@@ -0,0 +1,8 @@
+query HeroNameAndFriends {
+ hero {
+ name
+ friends {
+ name
+ }
+ }
+}
diff --git a/tests/examplefiles/graphql/ex08_operation_name.graphql.output b/tests/examplefiles/graphql/ex08_operation_name.graphql.output
new file mode 100644
index 00000000..eacc529e
--- /dev/null
+++ b/tests/examplefiles/graphql/ex08_operation_name.graphql.output
@@ -0,0 +1,25 @@
+'query' Keyword
+' ' Text.Whitespace
+'HeroNameAndFriends' Name.Function
+' ' Text.Whitespace
+'{' Punctuation
+'\n ' Text.Whitespace
+'hero' Name
+' ' Text.Whitespace
+'{' Punctuation
+'\n ' Text.Whitespace
+'name' Name
+'\n ' Text.Whitespace
+'friends' Name
+' ' Text.Whitespace
+'{' Punctuation
+'\n ' Text.Whitespace
+'name' Name
+'\n ' Text.Whitespace
+'}' Punctuation
+'\n ' Text.Whitespace
+'}' Punctuation
+'\n' Text.Whitespace
+
+'}' Punctuation
+'\n' Text.Whitespace
diff --git a/tests/examplefiles/graphql/ex09_variables1.graphql b/tests/examplefiles/graphql/ex09_variables1.graphql
new file mode 100644
index 00000000..5f0f4ef1
--- /dev/null
+++ b/tests/examplefiles/graphql/ex09_variables1.graphql
@@ -0,0 +1,8 @@
+query HeroNameAndFriends($episode: Episode) {
+ hero(episode: $episode) {
+ name
+ friends {
+ name
+ }
+ }
+}
diff --git a/tests/examplefiles/graphql/ex09_variables1.graphql.output b/tests/examplefiles/graphql/ex09_variables1.graphql.output
new file mode 100644
index 00000000..8d6bdd9f
--- /dev/null
+++ b/tests/examplefiles/graphql/ex09_variables1.graphql.output
@@ -0,0 +1,37 @@
+'query' Keyword
+' ' Text.Whitespace
+'HeroNameAndFriends' Name.Function
+'(' Punctuation
+'$episode' Name.Variable
+':' Punctuation
+' ' Text.Whitespace
+'Episode' Name.Class
+')' Punctuation
+' ' Text.Whitespace
+'{' Punctuation
+'\n ' Text.Whitespace
+'hero' Name
+'(' Punctuation
+'episode' Name
+':' Punctuation
+' ' Text.Whitespace
+'$episode' Name.Variable
+')' Punctuation
+' ' Text.Whitespace
+'{' Punctuation
+'\n ' Text.Whitespace
+'name' Name
+'\n ' Text.Whitespace
+'friends' Name
+' ' Text.Whitespace
+'{' Punctuation
+'\n ' Text.Whitespace
+'name' Name
+'\n ' Text.Whitespace
+'}' Punctuation
+'\n ' Text.Whitespace
+'}' Punctuation
+'\n' Text.Whitespace
+
+'}' Punctuation
+'\n' Text.Whitespace
diff --git a/tests/examplefiles/graphql/ex10_variables2.graphql b/tests/examplefiles/graphql/ex10_variables2.graphql
new file mode 100644
index 00000000..3db6cc71
--- /dev/null
+++ b/tests/examplefiles/graphql/ex10_variables2.graphql
@@ -0,0 +1,8 @@
+query HeroNameAndFriends($episode: Episode = JEDI) {
+ hero(episode: $episode) {
+ name
+ friends {
+ name
+ }
+ }
+}
diff --git a/tests/examplefiles/graphql/ex10_variables2.graphql.output b/tests/examplefiles/graphql/ex10_variables2.graphql.output
new file mode 100644
index 00000000..751cdc8a
--- /dev/null
+++ b/tests/examplefiles/graphql/ex10_variables2.graphql.output
@@ -0,0 +1,41 @@
+'query' Keyword
+' ' Text.Whitespace
+'HeroNameAndFriends' Name.Function
+'(' Punctuation
+'$episode' Name.Variable
+':' Punctuation
+' ' Text.Whitespace
+'Episode' Name.Class
+' ' Text.Whitespace
+'=' Punctuation
+' ' Text.Whitespace
+'JEDI' Name.Constant
+')' Punctuation
+' ' Text.Whitespace
+'{' Punctuation
+'\n ' Text.Whitespace
+'hero' Name
+'(' Punctuation
+'episode' Name
+':' Punctuation
+' ' Text.Whitespace
+'$episode' Name.Variable
+')' Punctuation
+' ' Text.Whitespace
+'{' Punctuation
+'\n ' Text.Whitespace
+'name' Name
+'\n ' Text.Whitespace
+'friends' Name
+' ' Text.Whitespace
+'{' Punctuation
+'\n ' Text.Whitespace
+'name' Name
+'\n ' Text.Whitespace
+'}' Punctuation
+'\n ' Text.Whitespace
+'}' Punctuation
+'\n' Text.Whitespace
+
+'}' Punctuation
+'\n' Text.Whitespace
diff --git a/tests/examplefiles/graphql/ex11_directives.graphql b/tests/examplefiles/graphql/ex11_directives.graphql
new file mode 100644
index 00000000..9f0b76f1
--- /dev/null
+++ b/tests/examplefiles/graphql/ex11_directives.graphql
@@ -0,0 +1,8 @@
+query Hero($episode: Episode, $withFriends: Boolean!) {
+ hero(episode: $episode) {
+ name
+ friends @include(if: $withFriends) {
+ name
+ }
+ }
+}
diff --git a/tests/examplefiles/graphql/ex11_directives.graphql.output b/tests/examplefiles/graphql/ex11_directives.graphql.output
new file mode 100644
index 00000000..486b87c4
--- /dev/null
+++ b/tests/examplefiles/graphql/ex11_directives.graphql.output
@@ -0,0 +1,52 @@
+'query' Keyword
+' ' Text.Whitespace
+'Hero' Name.Function
+'(' Punctuation
+'$episode' Name.Variable
+':' Punctuation
+' ' Text.Whitespace
+'Episode' Name.Class
+',' Punctuation
+' ' Text.Whitespace
+'$withFriends' Name.Variable
+':' Punctuation
+' ' Text.Whitespace
+'Boolean' Name.Builtin
+'!' Punctuation
+')' Punctuation
+' ' Text.Whitespace
+'{' Punctuation
+'\n ' Text.Whitespace
+'hero' Name
+'(' Punctuation
+'episode' Name
+':' Punctuation
+' ' Text.Whitespace
+'$episode' Name.Variable
+')' Punctuation
+' ' Text.Whitespace
+'{' Punctuation
+'\n ' Text.Whitespace
+'name' Name
+'\n ' Text.Whitespace
+'friends' Name
+' ' Text.Whitespace
+'@include' Name.Decorator
+'(' Punctuation
+'if' Name
+':' Punctuation
+' ' Text.Whitespace
+'$withFriends' Name.Variable
+')' Punctuation
+' ' Text.Whitespace
+'{' Punctuation
+'\n ' Text.Whitespace
+'name' Name
+'\n ' Text.Whitespace
+'}' Punctuation
+'\n ' Text.Whitespace
+'}' Punctuation
+'\n' Text.Whitespace
+
+'}' Punctuation
+'\n' Text.Whitespace
diff --git a/tests/examplefiles/graphql/ex12_mutations.graphql b/tests/examplefiles/graphql/ex12_mutations.graphql
new file mode 100644
index 00000000..c82d383d
--- /dev/null
+++ b/tests/examplefiles/graphql/ex12_mutations.graphql
@@ -0,0 +1,6 @@
+mutation CreateReviewForEpisode($ep: Episode!, $review: ReviewInput!) {
+ createReview(episode: $ep, review: $review) {
+ stars
+ commentary
+ }
+}
diff --git a/tests/examplefiles/graphql/ex12_mutations.graphql.output b/tests/examplefiles/graphql/ex12_mutations.graphql.output
new file mode 100644
index 00000000..5d6def44
--- /dev/null
+++ b/tests/examplefiles/graphql/ex12_mutations.graphql.output
@@ -0,0 +1,45 @@
+'mutation' Keyword
+' ' Text.Whitespace
+'CreateReviewForEpisode' Name.Function
+'(' Punctuation
+'$ep' Name.Variable
+':' Punctuation
+' ' Text.Whitespace
+'Episode' Name.Class
+'!' Punctuation
+',' Punctuation
+' ' Text.Whitespace
+'$review' Name.Variable
+':' Punctuation
+' ' Text.Whitespace
+'ReviewInput' Name.Class
+'!' Punctuation
+')' Punctuation
+' ' Text.Whitespace
+'{' Punctuation
+'\n ' Text.Whitespace
+'createReview' Name
+'(' Punctuation
+'episode' Name
+':' Punctuation
+' ' Text.Whitespace
+'$ep' Name.Variable
+',' Punctuation
+' ' Text.Whitespace
+'review' Name
+':' Punctuation
+' ' Text.Whitespace
+'$review' Name.Variable
+')' Punctuation
+' ' Text.Whitespace
+'{' Punctuation
+'\n ' Text.Whitespace
+'stars' Name
+'\n ' Text.Whitespace
+'commentary' Name
+'\n ' Text.Whitespace
+'}' Punctuation
+'\n' Text.Whitespace
+
+'}' Punctuation
+'\n' Text.Whitespace
diff --git a/tests/examplefiles/graphql/ex13_inline_fragments1.graphql b/tests/examplefiles/graphql/ex13_inline_fragments1.graphql
new file mode 100644
index 00000000..df261926
--- /dev/null
+++ b/tests/examplefiles/graphql/ex13_inline_fragments1.graphql
@@ -0,0 +1,11 @@
+query HeroForEpisode($ep: Episode!) {
+ hero(episode: $ep) {
+ name
+ ... on Droid {
+ primaryFunction
+ }
+ ... on Human {
+ height
+ }
+ }
+}
diff --git a/tests/examplefiles/graphql/ex13_inline_fragments1.graphql.output b/tests/examplefiles/graphql/ex13_inline_fragments1.graphql.output
new file mode 100644
index 00000000..16348903
--- /dev/null
+++ b/tests/examplefiles/graphql/ex13_inline_fragments1.graphql.output
@@ -0,0 +1,54 @@
+'query' Keyword
+' ' Text.Whitespace
+'HeroForEpisode' Name.Function
+'(' Punctuation
+'$ep' Name.Variable
+':' Punctuation
+' ' Text.Whitespace
+'Episode' Name.Class
+'!' Punctuation
+')' Punctuation
+' ' Text.Whitespace
+'{' Punctuation
+'\n ' Text.Whitespace
+'hero' Name
+'(' Punctuation
+'episode' Name
+':' Punctuation
+' ' Text.Whitespace
+'$ep' Name.Variable
+')' Punctuation
+' ' Text.Whitespace
+'{' Punctuation
+'\n ' Text.Whitespace
+'name' Name
+'\n ' Text.Whitespace
+'...' Punctuation
+' ' Text.Whitespace
+'on' Keyword
+' ' Text.Whitespace
+'Droid' Name.Class
+' ' Text.Whitespace
+'{' Punctuation
+'\n ' Text.Whitespace
+'primaryFunction' Name
+'\n ' Text.Whitespace
+'}' Punctuation
+'\n ' Text.Whitespace
+'...' Punctuation
+' ' Text.Whitespace
+'on' Keyword
+' ' Text.Whitespace
+'Human' Name.Class
+' ' Text.Whitespace
+'{' Punctuation
+'\n ' Text.Whitespace
+'height' Name
+'\n ' Text.Whitespace
+'}' Punctuation
+'\n ' Text.Whitespace
+'}' Punctuation
+'\n' Text.Whitespace
+
+'}' Punctuation
+'\n' Text.Whitespace
diff --git a/tests/examplefiles/graphql/ex14_inline_fragments2.graphql b/tests/examplefiles/graphql/ex14_inline_fragments2.graphql
new file mode 100644
index 00000000..f756edc4
--- /dev/null
+++ b/tests/examplefiles/graphql/ex14_inline_fragments2.graphql
@@ -0,0 +1,14 @@
+{
+ search(text: "an") {
+ __typename
+ ... on Human {
+ name
+ }
+ ... on Droid {
+ name
+ }
+ ... on Starship {
+ name
+ }
+ }
+}
diff --git a/tests/examplefiles/graphql/ex14_inline_fragments2.graphql.output b/tests/examplefiles/graphql/ex14_inline_fragments2.graphql.output
new file mode 100644
index 00000000..2cfca433
--- /dev/null
+++ b/tests/examplefiles/graphql/ex14_inline_fragments2.graphql.output
@@ -0,0 +1,57 @@
+'{' Punctuation
+'\n ' Text.Whitespace
+'search' Name
+'(' Punctuation
+'text' Name
+':' Punctuation
+' ' Text.Whitespace
+'"' Literal.String
+'an' Literal.String
+'"' Literal.String
+')' Punctuation
+' ' Text.Whitespace
+'{' Punctuation
+'\n ' Text.Whitespace
+'__typename' Name
+'\n ' Text.Whitespace
+'...' Punctuation
+' ' Text.Whitespace
+'on' Keyword
+' ' Text.Whitespace
+'Human' Name.Class
+' ' Text.Whitespace
+'{' Punctuation
+'\n ' Text.Whitespace
+'name' Name
+'\n ' Text.Whitespace
+'}' Punctuation
+'\n ' Text.Whitespace
+'...' Punctuation
+' ' Text.Whitespace
+'on' Keyword
+' ' Text.Whitespace
+'Droid' Name.Class
+' ' Text.Whitespace
+'{' Punctuation
+'\n ' Text.Whitespace
+'name' Name
+'\n ' Text.Whitespace
+'}' Punctuation
+'\n ' Text.Whitespace
+'...' Punctuation
+' ' Text.Whitespace
+'on' Keyword
+' ' Text.Whitespace
+'Starship' Name.Class
+' ' Text.Whitespace
+'{' Punctuation
+'\n ' Text.Whitespace
+'name' Name
+'\n ' Text.Whitespace
+'}' Punctuation
+'\n ' Text.Whitespace
+'}' Punctuation
+'\n' Text.Whitespace
+
+'}' Punctuation
+'\n' Text.Whitespace