This issue is present again.
Intended outcome:
To get in data object of useQuery hook result of updateQuery function which was provided as option in fetchMore call.
Actual outcome:
Getting in data object in useQuery hook PREVIOUS result of updateQuery function which was provided as option in fetchMore call or original result of a query (if it was the first call to fetchMore).
Version
[email protected] and further releasess
Reproduction
https://codesandbox.io/s/quizzical-goldberg-chfj2
We have the same problem. Any ideas how to solve it?
Maybe related issue. We also get PREVIOUS result here.
Facing the same issue here
Any clues on this one? This is a big issue :/
I have the same issue. My current workaround is to keep track of the already fetched pages in a ref and ignore calls to fetchMore if the page is already fetched.
Note that Apollo triggers another render with the correct data.
This is supposedly fixed in the next version: https://github.com/apollographql/react-apollo/issues/3333#issuecomment-577882189.
I have the same problem, I can add more information :
I'm using useQuery from @apollo/react-hooks
It's happening when usingfetchPolicy: 'cache-and-network'.
I am running on the latest v.3 beta.48
Most helpful comment
Maybe related issue. We also get PREVIOUS result here.
https://github.com/apollographql/react-apollo/issues/3640