-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
I just spent quite some time scratching my head as to why useSuspenseQuery was unexpectedly returning cached data.
In our case, our graphql server implementation calls out to an unreliable external service, and returns a graphql error if that call fails.
Unmounting/remounting to trigger a "fresh" useSuspenseQuery did not work as anticipated due to the suspense cache, which doesn't appear to be documented anywhere.
I'd suggest documenting:
- The fact that the suspense cache exists, what it does, and what it's for
- How to configure autoDisposeTimeoutMs
Additionally, perhaps the behavior of the suspense cache should be reconsidered - in my opinion calling useSuspenseQuery with a fetchPolicy of 'network-only', 'no-cache', etc.. should probably do what it says on the tin, rather than there being a whole extra layer of hidden caching involved...
Metadata
Metadata
Assignees
Labels
No labels