in React using graphql, There is this issue I face where I get prompted with
Store reset while query was in flight (not completed in link chain)
when I log out my user.
the code is
const onSignout = async () => {
removeToken();
client.cache.reset();
await client.resetStore();
history.push('/');
};
I followed the many issues on github like https://github.com/apollographql/apollo-client/issues/3766
and changed to
client.stop();
client.cache.reset();
client.resetStore();
but still happen
I checked the network, no query are pending when login out.
similar : Preventing: Store reset while query was in flight (not completed in link chain)