I have a very specific case where we query a list of objects with id with let’s say
query A. The result is used application wide.
At some point we query an other list which can include the same data as the first query has but now with
When the new list arrives as result of
query B right after that
query A got refetched.
So when this
query A resolves and the results written to the cache
query B got refetched.
And it goes infinite.
Does somebody know how can I prevent the refetch of
query A after
query B returns the same object?
I think it is because each query contains an object which will update the entity cache which will invalidate the previous query cache which will trigger a auto refetch for the other query.
We tried to avoid this behaviour by setting up
keyFields: false to prevent the normalisation of the entity. It does not normalise (no root level caching) but still does the refetch.
Any ideas are welcome.
Thanks for your help!