-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Old query gets re-fetched after another one calls.. But old component is already unmounted.. #6644
Comments
Hello! If you could provide a runnable reproduction, that would help a lot in getting your issue fixed. The information provided so far is not quite enough to find the problem. |
Hmm I just found this issue behavior looks similar to many others so i will just provide links for now.. #6634 |
Let us know if this is still a concern with |
same problem while using react native using lazyquery fetching data on search and fetchmore on scroll, after switching to details old search query retriggers I have an example here |
I`m using Apollo client v3 and i did migration from prev version now im having strange behavior...
Intended outcome:
One Query Hook cannot affect another Query hook (in separate component) which is not mounted..
Actual outcome:
I have 2 query's in 2 different components (displayed as tabs )
"GetUserOverviewData" (Query 1 in Component 1) and "GetUserSettingsData" (Query 2 in Component 2) they have some equal fields inside...
When i call refetch or fetchmore on GetUserSettingsData the additional fetch for GetUserOverviewData is called... but this component where hook is, is not loaded... client make this fetch and i have no idea why?
The react adds error message that im trying to process update on unmounted component... Component is unmounted i tested this by simple UseEffect.. Looks like some observable is not unregistered..
Fetchpolicy is set to "cache-and-network", to have new data on each new component root render..
In old Apollo all was working well is there some new change to this ?
Versions:
"@apollo/client": "^3.0.2",
"graphql-tag": "^2.10.4",
"react": "^16.13.1",
Edited:
I found similar issues (just for info)
#6634
apollographql/react-apollo#4044
apollographql/react-apollo#4000
The text was updated successfully, but these errors were encountered: