fix(cozy-client): Failed queries not respecting fetchPolicy#1648
fix(cozy-client): Failed queries not respecting fetchPolicy#1648
Conversation
|
This is an interesting finding. I don’t know yet if this is the right fix because updating the lastUpdated if the request fail sounds wrong to me. But maybe checking the lastUpdateError in the policy is better. But why on earth do we have component that re render infinitely?! Is it because of this hook? Or is it related to something else? |
673a8cf to
973fe90
Compare
I updated the PR ( to a less ugly solution ), but i still haven't figured why the components or the hook is looping YET. |
973fe90 to
debc5e7
Compare
issue
When a query fails, it does not update the store, which causes the OlderThan fetch policy to always return true, and this will cause an infinite loop when trying to fetch the same query.
this is used everywhere, especially in the useInstanceInfo hook,