Hello everyone, I’m having an issue where I’m using a query hook after I’ve logged off then logged back in again. What’s happening is the data from the useQuery hook is undefined and the loading return is always true after logging off then back on.
Now when logging off, I call client.cache.reset(), however when I look in the Apollo client extension I still see that there are two queries in the Active Queries list. I’ve tried client.clearStore() and client.resetStore() and I still noticed that there are active queries in the list. I’m assuming that Apollo, when trying to call that query again, sees that it’s in the query list, then attempts to return the cached value of this query. However the cached value has been cleared during the logoff process so it’s not returning anything. The network tab doesn’t have an entry for the query that the hook is calling. I debugged and didn’t see a skip option in there either.
Any idea how one completely clears out all Active queries from the Apollo cache without refreshing the app? Or if there’s another issue that you think may be occurring? Thanks.