-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Closed
Labels
Description
Issue Description
If client.clearStore
is called while a query response is pending, it's causing a crashing at this location https://github.com/apollographql/apollo-client/blob/main/src/react/hooks/useQuery.ts#L635.

I am using
[email protected]
[email protected]
@muchobien/apollo-persistence-mapper@npm:^1.0.0
[email protected]
and here's how I am initializing my client
persistCacheSync({
cache,
storage: new MMKVWrapper(mmkvStorage),
persistenceMapper,
trigger: "write",
debug: __DEV__,
});
const persistLink = createPersistLink();
const client = new ApolloClient({
cache,
link: from([
persistLink,
sentryBreadcrumbsLink,
retryLink,
authLink,
tokenRefreshLink,
errorLink,
httpLink,
]),
});
I've also tried using resetStore
, but I get the same error. Any feedback regarding a potential cause is greatly appreciated.
Link to Reproduction
N/A
Reproduction Steps
No response
@apollo/client
version
3.9.11
Nehal-Zeller, RalissonMattias, DerekWang98 and ryanlonstein