-
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
useLazyQuery
load function refetches from network regardless cache and variables
#9209
Comments
Having the same problem over here, was going crazy trying to find out why my cached responses did still requests to the server. |
same here |
I noticed the same issue when I was analyzing network requests with Chrome inspector |
Same problem here, I fixed it by returning to |
Seeing this behavior as well, additionally for my case of trying to
First Call: Only returns from cache - however, if there is no cached information there is no error as the documentation describes. Second & additional calls: Always make a network request. |
Reverting to |
@anfinil @Ccastillo06 @orelHAnyvision @mcsimps2 @LiamKlyneker @CowDotDev @sarink Can you try the latest v3.6 beta by running |
@benjamn Can confirm I'm no longer seeing |
@benjamn I can confirm that fix is working. |
According last refactoring:
apollo-client/src/react/hooks/useLazyQuery.ts
Line 48 in bc6488c
apollo-client/src/core/ObservableQuery.ts
Line 334 in 6a5ae8a
useLazyQuery
load
function will refetch data from network every time even with the same variables and regardless cache andfetchPolicy
.Desired behaviour: if
load
function results are cached (variables are the same), it shouldn't request network.The text was updated successfully, but these errors were encountered: