apollographql / apollographql/apollo-client-devtools
When executing a @client query, result is not filtered to the selection set
- Dominant language
- TypeScript
- Stars
- 1.5k
- Forks
- 172
- Avg merge
- 10m
- Merged PRs (30d)
- 8
Description
**Intended outcome:**
Execute a `@client` query against local resolvers from GraphiQL and see in the result only the fields asked for in the query.
**Actual outcome:**
The entire object as returned by the local resolver is displayed
**How to reproduce the issue:**
Create a local resolver to implement
```
type Query {
foo: Bar
}
type Bar {
a: int
b: int
}
```
Execute query in GraphiQL
```
query {
foo {
a
}
}
```
You will see both `a` and `b` fields returned in the result pane, instead of just `a`.
Note that the Apollo client itself does _not_ suffer from this problem - that is, in code the result emitted by the observable will be correctly filtered based on the selection set.
This issue makes giving demos/trainings to show the flexible nature of GQL particularly frustrating.
**Desktop (please complete the following information):**
- OS: Mac BIg Sur
- Browser Chrome
- Chrome version: 89.0.4389.90
- Extension version: 3.0.2
Contributor guide
Assessment
This issue has not been assessed yet.