Closed kitten closed 1 year ago
This looks to me like it would solve #3093, but I'm wondering if it would possibly introduce some kind of issues for the ssrExchange? I don't really have any experience with React SSR or the ssrExchange, so I'm not sure if my concerns have any basis. Could re-executing these queries against the cache after storage hydration cause stale data from the cache to show up in query results, overriding the data from the ssrExchange?
Resolves #3093
Summary
Adds missing retries of query operations when offline rehydration has completed and fix the timing of flushing the failed queue of operations after rehydration.
The former can lead to operations only awaiting network requests even after finishing storage rehydration, since no additional operations would be issued.
The latter can lead to stalled operations when the device is offline on load.
Set of changes
failedQueue
while rehydratingflushQueue
to after storage rehydrationonOnline
register toflushQueue