When I open the "Apollo" chrome extension, I get an error - Uncaught TypeError: Cannot read property 'queryStore' of undefined.
const cache = new InMemoryCache();
const options = {
link : ApolloLink.from([
setContext(getContext),
withClientState({ cache, defaults: { theme: 'dark' } }),
new BatchHttpLink({ uri: '/gql', credentials: 'same-origin' })
]),
cache,
defaultOptions: {
query: {
fetchPolicy: 'no-cache'
}
},
clientState : {
defaults: {
applicationurls: {}
}
}
};
return new ApolloClient(options);
Anand
Looks like the QueryManager is getting initialized lazily when the first query or mutation performed. Calling initQuerymanager() after creating the client seems to have solved the problem.
Is this is known issue?
Same for me, as suggested by @nanandn solved by adding client.initQueryManager() after client creation. (with M uppercase ;).
@nanandn THANK YOU SO MUCH, FINALLY! I have had this issue for months now!
Fixed by https://github.com/apollographql/apollo-client-devtools/pull/139. Thanks!
Most helpful comment
Looks like the QueryManager is getting initialized lazily when the first query or mutation performed. Calling initQuerymanager() after creating the client seems to have solved the problem.
Is this is known issue?