-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
useLazyQuery doesn't work with cache-and-network fetch policy #7171
Comments
Happening here too |
The
But as mentioned on the docs, after triggered it should behave like a
|
i can confirm that setting |
Happening here too. Any work around? |
Same issue here. |
Not working also with |
Same issue, using |
this is work for me
|
it seems that the
|
I have similar issue.
didn't work for me. When I switch to regular query, it works just fine with cache. Thanks |
Hi team, But I'm facing this issue too. I tried 3.5.0 version and the latest 3.10.0. Nothing helped me. Will try to change useLazyQuery to a common useQuery, or try to remove cached response. |
Intended outcome:
After the lazy query be triggered, it should behave correctly according to the fetch policy chosen
Actual outcome:
The fetch policy
cache-and-network
isn't working when using lazy queries. It should look on the server and update the cache with the most recent data.How to reproduce the issue:
Execute
useLazyQuery
hook using fetch-policy ascache-and-network
on@apollo/client
v3.1.3.Also, I'm setting
cache-and-network
as the default fetch policy for all queries. Refer to the config:Versions
The text was updated successfully, but these errors were encountered: