Closed bnm27 closed 1 year ago
Might be related to this: https://github.com/apollographql/apollo-client/issues/3402
Having same issue. the issue pointed seems in deed related but is closed.
We are facing the same issue right now. The apollo client responses only with the __typename
. But looking into the browser network request, the response contains all requested data.
This one fixed it for me: https://github.com/apollographql/apollo-client/issues/7470
If your query type is not called Query
, you have to specify it in the InMemoryCache
. In the example given, the query type is called Root
and hence it fails.
Edit: fix the link
@peterfication thanks for the solution, though you might have copy-pasted the wrong link.
I'll close this, since it is not specific to apollo-angular.
Describe the bug
It appears that I cannot use a query fragment as a top level statement inside of a query.
e.g.
If the fragment is nested under another node it works fine, but when placed directly in a query then no data is returned.
As far as I can tell this is valid and should work since the API will return the same results for both queries when executed directly against the API
To Reproduce
I have put together an example here: https://stackblitz.com/edit/node-c2x7qv?file=src/app/films/films.component.graphql
Expected behavior
Data is returned when executing a query where a query fragment is supplied as a top level statement
Environment:
Additional context