Skip to content
Advertisement

Error: Network error: Error writing result to store for query (Apollo Client)

I am using Apollo Client to make an application to query my server using Graphql. I have a python server on which I execute my graphql queries which fetches data from the database and then returns it back to the client.

I have created a custom NetworkInterface for the client that helps me to make make customized server request (by default ApolloClient makes a POST call to the URL we specify). The network interface only has to have a query() method wherein we return the promise for the result of form Promise<ExecutionResult>.

I am able to make the server call and fetch the requested data but still getting the following error.

JavaScript

I want to know the possible cause of the error and solution if possible.

Advertisement

Answer

I had a similar error. I worked it out by adding id to query. for example, my current query was

JavaScript

my new query was

JavaScript
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement