After sending the following query to my GraphQL server:
fragment B on root_query {
foo {
id
}
}
query A {
...B
}
The data received from the server includes the foo
field. However, when I retrieve it using Apollo's InMemoryCache
and either ApolloClient.query()
or useQuery()
, the foo
field is missing.
The server-provided foo
has the correct __typename
and id
.
I was expecting to find the contents of fragment B
in result.data
, but they are not present and no errors or warnings are returned.
If I manually include the fragment in the query, everything works as expected.