-
Notifications
You must be signed in to change notification settings - Fork 786
network-only returns a cached value for a different query #3684
Comments
I think this is actually intentional behavior. Looking at the docs for
I think the keyword here is initial. It will not return initial data from the cache. But once the initial data has been returned, network-only queries are subscribed to the cache and receive updates from the cache. |
The problem I am having is that the useQuery hook is returning the cache update of a different query. |
I agree that that behavior is unexpected and (in most cases) unwanted. But I don't think it counts as a bug. Maybe you could file an issue over at https://github.com/apollographql/apollo-feature-requests/issues ? |
So the intended usage of |
I'm going to update the description here to say that this is an issue w/ 3.0.0 , I'm getting an issue now that makes me believe I may not have rebuilt my dev server w/ 3.1.3 like I thought. |
You can definitely use more than 1 |
thanks dylan, that actually is very helpful in my understanding. I'm going to close this since its an old version, hopefully others will find this discussion helpful |
With
"@apollo/react-hooks": "3.0.0",
I make a useQuery request in one component, and then another makes a useQuery request, whichever resolves last then becomes the value of the other component. They are different queries!
my client is configured for "network-only", adding "no-cache" option to useQuery fixed the issue.
Someone else posted the solution 8 days ago on this closed thread: #556
The text was updated successfully, but these errors were encountered: