-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added GraphQL improvements and tests (#1788)
This makes some improvements to GraphQL and expands the existing tests.
- Loading branch information
1 parent
3e00bb9
commit b2298b1
Showing
8 changed files
with
194 additions
and
23 deletions.
There are no files selected for viewing
This file contains 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
interface Foo {} | ||
type Foo {} | ||
type Foo implements Bar {} | ||
enum Foo {} | ||
scalar Foo | ||
union Foo | ||
on Foo {} | ||
|
||
---------------------------------------------------- | ||
|
||
[ | ||
["keyword", "interface"], | ||
["class-name", "Foo"], | ||
["punctuation", "{"], | ||
["punctuation", "}"], | ||
|
||
["keyword", "type"], | ||
["class-name", "Foo"], | ||
["punctuation", "{"], | ||
["punctuation", "}"], | ||
|
||
["keyword", "type"], | ||
["class-name", "Foo"], | ||
["keyword", "implements"], | ||
["class-name", "Bar"], | ||
["punctuation", "{"], | ||
["punctuation", "}"], | ||
|
||
["keyword", "enum"], | ||
["class-name", "Foo"], | ||
["punctuation", "{"], | ||
["punctuation", "}"], | ||
|
||
["keyword", "scalar"], | ||
["class-name", "Foo"], | ||
|
||
["keyword", "union"], | ||
["class-name", "Foo"], | ||
|
||
["keyword", "on"], | ||
["class-name", "Foo"], | ||
["punctuation", "{"], | ||
["punctuation", "}"] | ||
] | ||
|
||
---------------------------------------------------- | ||
|
||
Checks for class names. |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
enum Color { | ||
RED | ||
GREEN | ||
BLUE | ||
} | ||
|
||
{ | ||
foo(bar: RED) { | ||
baz | ||
} | ||
} | ||
|
||
---------------------------------------------------- | ||
|
||
[ | ||
["keyword", "enum"], | ||
["class-name", "Color"], | ||
["punctuation", "{"], | ||
["constant", "RED"], | ||
["constant", "GREEN"], | ||
["constant", "BLUE"], | ||
["punctuation", "}"], | ||
|
||
["punctuation", "{"], | ||
"\n\tfoo", | ||
["punctuation", "("], | ||
["attr-name", "bar"], | ||
["punctuation", ":"], | ||
["constant", "RED"], | ||
["punctuation", ")"], | ||
["punctuation", "{"], | ||
"\n\t\tbaz\n\t", | ||
["punctuation", "}"], | ||
["punctuation", "}"] | ||
] | ||
|
||
---------------------------------------------------- | ||
|
||
Checks for constants. |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
...frag | ||
} | ||
|
||
fragment frag on FooBar { | ||
foo | ||
bar | ||
} | ||
|
||
---------------------------------------------------- | ||
|
||
[ | ||
["punctuation", "{"], | ||
["operator", "..."], | ||
["fragment", "frag"], | ||
["punctuation", "}"], | ||
|
||
["keyword", "fragment"], | ||
["fragment", "frag"], | ||
["keyword", "on"], | ||
["class-name", "FooBar"], | ||
["punctuation", "{"], | ||
"\r\n\tfoo\r\n\tbar\r\n", | ||
["punctuation", "}"] | ||
] | ||
|
||
---------------------------------------------------- | ||
|
||
Checks for fragments. |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
= ! | | ||
... | ||
|
||
---------------------------------------------------- | ||
|
||
[ | ||
["operator", "="], | ||
["operator", "!"], | ||
["operator", "|"], | ||
["operator", "..."] | ||
] | ||
|
||
---------------------------------------------------- | ||
|
||
Checks for operators. |