You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
From the Node detail-page when I use the browser Back button (so it'a navigating back to the overview page, without refreshing the browser) and navigate from this overview page to another Node detail-page, it's merging the results from the previous route and the current route?
Somehow, when I hit the Back button, I have to reset the cache or something?
How do I have to solve this issue?
The text was updated successfully, but these errors were encountered:
meesfrenkelfrank
changed the title
Apollo Client fetchMore cache merging previous (from other route) and new results when using react-router useHistory
Apollo Client cache merging previous (from other route) and new results when using react-router useHistory
Jan 11, 2022
meesfrenkelfrank
changed the title
Apollo Client cache merging previous (from other route) and new results when using react-router useHistory
Apollo Client cache merging previous (from other route) and new results when using browser back button
Jan 12, 2022
Hey folks! I think this issue is related to #9334 and I put together a repro case there. When notifyOnNetworkStatusChange: true, it seems Apollo is behaving as if returnPartialData: true is also true. When you navigate back, I think useQuery is yielding a partial data object from cache.
It might also be mixing data on object 1 with data about object 2 but I didn't observe that, just that it returned a partial state that wasn't asked for.
I am using Apollo Client fetchMore function and configured the Apollo Client cache:
The Apollo Client typePolicies configured like:
From the Node detail-page when I use the browser Back button (so it'a navigating back to the overview page, without refreshing the browser) and navigate from this overview page to another Node detail-page, it's merging the results from the previous route and the current route?
In the useQuery hook I am using:
Somehow, when I hit the Back button, I have to reset the cache or something?
How do I have to solve this issue?
The text was updated successfully, but these errors were encountered: