Open smitpatel1010 opened 2 years ago
I’m currently on my phone in bed (it’s 3AM), but I bet you if you remove the nextFetchPolicy: 'cache-first'
line, everything works as expected? Just a hunch. I will look into it more fully in the morning. Thanks for the reproduction!
Yes, If we remove nextFetchPolicy: 'cache-first'
line then it works fine. but I want pagination
with cache-and-network
and because of this issue I had to add this line. and Thanks for quick reply
@smitpatel1010 Thanks for the confirmation! I updated the title to reflect this detail; I hope you don’t mind. I’m not too sure about how nextFetchPolicy
should work with the skip
option, so I might need to do some rereading of the docs for that option to see what’s up. I’ll also try to follow up on the issue you linked as it seems to be causing people a lot of frustration.
Thanks @brainkim. I will also check if I can find any workaround or any relevant info in docs
Intended outcome: If the skip is false in useQuery then a new call should go and the cache should update with a new response.
Actual outcome: If the skip is false in useQuery then a new call is going correct but the cache is not updating with the latest response came.
How to reproduce the issue: https://codesandbox.io/s/serene-grass-qwy7b?file=/src/index.js Open this codesandbox and follow below steps.
then check new call is going and received new data but the cache is not updating the value with the latest response.