You are not logged in. Your edit will be placed in a queue until it is peer reviewed.
We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.
-
Great insight — I ran into a similar issue. resetStore() will refetch all currently active queries, and if your component is in the process of unmounting, Apollo might still consider its query as active because useQuery hasn't finalized the cleanup. A good workaround (like you mentioned) is to keep the component mounted and just rely on skip: true to control the query. That way, Apollo won’t track the query as active at all when the condition is falsy. Might be worth filing an issue or feature request if Apollo can improve lifecycle handling around this edge case.Tugrul Yildirim– Tugrul Yildirim2025年04月11日 10:42:49 +00:00Commented Apr 11, 2025 at 10:42
-
@TugrulYildirim I have filed an issue. github.com/apollographql/apollo-client/issues/12547suyog– suyog2025年04月12日 11:26:45 +00:00Commented Apr 12, 2025 at 11:26
lang-js