-
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
Apollo seems to hit the network consistently, even if "cache-only" is the fetch policy #11341
Comments
ok like 99% convinced its because of that; is there any way of setting the fetch policy or will I have to transform this to a lazyQuery? |
100% convinced its that. I just changed it to a lazyQuery that fires on load although I try to avoid the useEffects as much as I can |
Yes, it's due to the Question: why do you not skip any |
good point, I did exactly that,thank you! |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Trying to figure out if im doing something wrong here.
Query: (we're using codegen to generate types from the schema)
ROOT_QUERY cache:
The component is basically a two part
radio
group toggle that either fetches allavailableHospitalsForAppointment
withdeptId: null
or per department scpecific hospitals.However, it seems that every time the call is made, a network request is always made, and always hits the backend.
All of the below calls are
GetAvailableHospitalsForAppointment
querieswe have custom typePolicies for certain things, but none for that graphtype
any thoughts on why this could happen? I set it
cache-only
just to check, but it always seems to hit the backend, otherwise we have it atcache-first
The text was updated successfully, but these errors were encountered: