Skip to content

Commit

Permalink
Add failing test for #916
Browse files Browse the repository at this point in the history
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
goto-bus-stop committed Sep 26, 2024
1 parent 03065e0 commit 75e8e7c
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 0 deletions.
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 } } } }
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`
───╯

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
}
}
}
}

0 comments on commit 75e8e7c

Please sign in to comment.