-
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.
It also reports this, which doesn't make sense: ``` Error: interface, union and object types must have a subselection set ╭─[0119_nested_subselection_issue_916.graphql:8:17] │ 8 │ query Invalid { me { name { reviews { body } } } } │ ────────────────┬─────────────── │ ╰───────────────── `Query.me` is an object type `User` and must select fields ───╯ ```
- Loading branch information
1 parent
03065e0
commit 75e8e7c
Showing
3 changed files
with
35 additions
and
0 deletions.
There are no files selected for viewing
8 changes: 8 additions & 0 deletions
8
crates/apollo-compiler/test_data/diagnostics/0119_nested_subselection_issue_916.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,8 @@ | ||
type Query { | ||
me: User | ||
} | ||
type User { | ||
name: String | ||
} | ||
|
||
query Invalid { me { name { reviews { body } } } } |
10 changes: 10 additions & 0 deletions
10
crates/apollo-compiler/test_data/diagnostics/0119_nested_subselection_issue_916.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,10 @@ | ||
Error: field selection of scalar type `String` must not have subselections | ||
╭─[0119_nested_subselection_issue_916.graphql:8:22] | ||
│ | ||
8 │ query Invalid { me { name { reviews { body } } } } | ||
│ ────────────┬──────────── | ||
│ ╰────────────── remove subselections here | ||
│ | ||
│ Note: path to the field: `query Invalid → me → name` | ||
───╯ | ||
|
17 changes: 17 additions & 0 deletions
17
...ollo-compiler/test_data/serializer/diagnostics/0119_nested_subselection_issue_916.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,17 @@ | ||
type Query { | ||
me: User | ||
} | ||
|
||
type User { | ||
name: String | ||
} | ||
|
||
query Invalid { | ||
me { | ||
name { | ||
reviews { | ||
body | ||
} | ||
} | ||
} | ||
} |