-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
implement parser validation for types missing fields
- Loading branch information
Showing
16 changed files
with
152 additions
and
34 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
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
2 changes: 1 addition & 1 deletion
2
crates/apollo-parser/test_data/parser/err/0045_ignored_token_spans.graphql
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
56 changes: 26 additions & 30 deletions
56
crates/apollo-parser/test_data/parser/err/0045_ignored_token_spans.txt
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
3 changes: 3 additions & 0 deletions
3
crates/apollo-parser/test_data/parser/err/0055_object_definition_with_missing_name.graphql
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,3 @@ | ||
type { | ||
id: String | ||
} |
19 changes: 19 additions & 0 deletions
19
crates/apollo-parser/test_data/parser/err/0055_object_definition_with_missing_name.txt
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,19 @@ | ||
- [email protected] | ||
- [email protected] | ||
- [email protected] "type" | ||
- [email protected] " " | ||
- [email protected] | ||
- [email protected] "{" | ||
- [email protected] "\n " | ||
- [email protected] | ||
- [email protected] | ||
- [email protected] "id" | ||
- [email protected] ":" | ||
- [email protected] " " | ||
- [email protected] | ||
- [email protected] | ||
- [email protected] "String" | ||
- [email protected] "\n" | ||
- [email protected] "}" | ||
- ERROR@6:7 "expected a name" { | ||
recursion limit: 500, high: 0 |
1 change: 1 addition & 0 deletions
1
crates/apollo-parser/test_data/parser/err/0056_object_definition_with_missing_curly.graphql
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 @@ | ||
type Person { id: String |
20 changes: 20 additions & 0 deletions
20
crates/apollo-parser/test_data/parser/err/0056_object_definition_with_missing_curly.txt
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,20 @@ | ||
- [email protected] | ||
- [email protected] | ||
- [email protected] "type" | ||
- [email protected] " " | ||
- [email protected] | ||
- [email protected] "Person" | ||
- [email protected] " " | ||
- [email protected] | ||
- [email protected] "{" | ||
- [email protected] " " | ||
- [email protected] | ||
- [email protected] | ||
- [email protected] "id" | ||
- [email protected] ":" | ||
- [email protected] " " | ||
- [email protected] | ||
- [email protected] | ||
- [email protected] "String" | ||
- ERROR@24:24 "expected R_CURLY, got EOF" EOF | ||
recursion limit: 500, high: 0 |
2 changes: 2 additions & 0 deletions
2
crates/apollo-parser/test_data/parser/err/0057_object_definition_with_missing_fields.graphql
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,2 @@ | ||
type Person { | ||
} |
13 changes: 13 additions & 0 deletions
13
crates/apollo-parser/test_data/parser/err/0057_object_definition_with_missing_fields.txt
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,13 @@ | ||
- [email protected] | ||
- [email protected] | ||
- [email protected] "type" | ||
- [email protected] " " | ||
- [email protected] | ||
- [email protected] "Person" | ||
- [email protected] " " | ||
- [email protected] | ||
- [email protected] "{" | ||
- [email protected] "\n" | ||
- [email protected] "}" | ||
- ERROR@14:15 "expected Field Definition" } | ||
recursion limit: 500, high: 0 |
3 changes: 3 additions & 0 deletions
3
...es/apollo-parser/test_data/parser/err/0058_interface_definition_with_missing_name.graphql
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,3 @@ | ||
interface { | ||
id: String | ||
} |
19 changes: 19 additions & 0 deletions
19
crates/apollo-parser/test_data/parser/err/0058_interface_definition_with_missing_name.txt
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,19 @@ | ||
- [email protected] | ||
- [email protected] | ||
- [email protected] "interface" | ||
- [email protected] " " | ||
- [email protected] | ||
- [email protected] "{" | ||
- [email protected] "\n " | ||
- [email protected] | ||
- [email protected] | ||
- [email protected] "id" | ||
- [email protected] ":" | ||
- [email protected] " " | ||
- [email protected] | ||
- [email protected] | ||
- [email protected] "String" | ||
- [email protected] "\n" | ||
- [email protected] "}" | ||
- ERROR@10:11 "expected a Name" { | ||
recursion limit: 500, high: 0 |
2 changes: 2 additions & 0 deletions
2
.../apollo-parser/test_data/parser/err/0059_interface_definition_with_missing_fields.graphql
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,2 @@ | ||
interface Person { | ||
} |
13 changes: 13 additions & 0 deletions
13
crates/apollo-parser/test_data/parser/err/0059_interface_definition_with_missing_fields.txt
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,13 @@ | ||
- [email protected] | ||
- [email protected] | ||
- [email protected] "interface" | ||
- [email protected] " " | ||
- [email protected] | ||
- [email protected] "Person" | ||
- [email protected] " " | ||
- [email protected] | ||
- [email protected] "{" | ||
- [email protected] "\n" | ||
- [email protected] "}" | ||
- ERROR@19:20 "expected Field Definition" } | ||
recursion limit: 500, high: 0 |
1 change: 1 addition & 0 deletions
1
...s/apollo-parser/test_data/parser/err/0060_interface_definition_with_missing_curly.graphql
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 @@ | ||
interface Person { id: String |
20 changes: 20 additions & 0 deletions
20
crates/apollo-parser/test_data/parser/err/0060_interface_definition_with_missing_curly.txt
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,20 @@ | ||
- [email protected] | ||
- [email protected] | ||
- [email protected] "interface" | ||
- [email protected] " " | ||
- [email protected] | ||
- [email protected] "Person" | ||
- [email protected] " " | ||
- [email protected] | ||
- [email protected] "{" | ||
- [email protected] " " | ||
- [email protected] | ||
- [email protected] | ||
- [email protected] "id" | ||
- [email protected] ":" | ||
- [email protected] " " | ||
- [email protected] | ||
- [email protected] | ||
- [email protected] "String" | ||
- ERROR@29:29 "expected R_CURLY, got EOF" EOF | ||
recursion limit: 500, high: 0 |