Open gurschitz opened 11 months ago
Hi @gurschitz 👋🏻 thanks for opening this issue! The team needs to triage this one further but we'll be taking a look soon. Thanks so much for the reproduction case 🙏🏻
This problem is still actual. Any updates?
Same. Problem is still actual.
The issue is reproducible
Issue Description
Hi there!
We are currently on Apollo 3.7.17 and looking into upgrading to latest Apollo (3.8.6 as time of writing). In 3.7.17 we are still experiencing https://github.com/apollographql/apollo-client/issues/10737, where we have the same setup with
cache-and-network
being the default fetchPolicy. In our case it also happens that we run a query withcache-and-network
, then due to thenextFetchPolicy
function that we implement, we set the next fetch policy tocache-first
(similar to how it is mentioned in the docs). Now while the first query is still running and the cached result is returned, we get back the loading state being false.This caused us to implement some workarounds, that we also need to think of whenever we add new queries. In the linked issue, there is a comment saying that this issue got inadvertently fixed in 3.8.x.
However, I have found that since 3.8.5, it happens again. Using the original code sandbox from the issue, I can see that it works with 3.8.4 but doesn't work with 3.8.5.
Link to Reproduction
https://codesandbox.io/s/loading-false-while-fetching-forked-45yqz8?file=/src/index.jsx
Reproduction Steps
See the reproduction link above.