-
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 ignores fetchPolicy #9375
Comments
I am encountering the same issue when upgrading to |
Experiencing this as well. |
🙇♂️🙇♂️🙇♂️ Sorry about this! I am continuously trying to fix the My reasoning at the time was that the hook’s use-case was very similar to refetching, but I guess people are using |
I'm not using with |
Hi, it is a big problem for us as we use
And subsequent call I hope it makes sense. Cheers. |
But even in previous versions this was not working as expected. The first call was respecting the |
@brainkim Hi, I have a special use case where in development the data should not be fetched remotely as it's loaded from a configuration file. In this case we manually write the data into the Apollo cache and then trigger the lazy query with In production mode, the data is fetched remotely, so we use You can take a look at the implementation here: https://github.com/commercetools/merchant-center-application-kit/blob/7490740e352a8ae27427e357f02a38a1db993936/packages/application-shell/src/hooks/use-applications-menu/use-applications-menu.ts#L156-L201 |
Stumbled on this today. Potentially related to #9209. |
Also seeing this, it appears to be appending the lazy query to the list of active queries prior to calling it as well |
Do we have an estimate on when this might be fixed? |
Also if you use |
@brainkim any ETA by chance? |
+1 for a fix here (or even a comment in the documentation)... I just spent hours trying to debug a seeming "cache miss" here only to discover this bug. |
This is the most important commit of the PR, since it fixes issue #9375.
This is the most important commit of the PR, since it fixes issue #9375.
@Deekor @emmenko @eettaa @Camsteack @colinrobertbrooks @vincentvella @pontusab Can you try the latest v3.6 beta by running |
@benjamn Can confirm I'm no longer seeing |
Still seeing this on last version with fetchPolicy |
Intended outcome:
getMe should never make a network call.
Actual outcome:
getMe always makes a network call.
How to reproduce the issue:
Versions
The text was updated successfully, but these errors were encountered: