Offline first Persist being removed #8696
Unanswered
Wolfleader101
asked this question in
Q&A
Replies: 0 comments
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
-
Hi,
I am trying to wrap my head around an offline first approach using
persistQueryClient
.The current issue is that if the app isn't "offline" but the API requests are failing (which is valid of behind proxy, or some other network issue) it then removes it from the local storage. This seems inline with the docs.
My issue is, that I don't want it to remove it from the storage. If there is an error to the request, and there is valid cached data, then it should continue returning the cached data in persistant storage, and now show as an error.
In the case of having an error, and no cached data, then it would enter the error state.
A similar discussion was had in #3623 - although this isn't the same use-case as I don't want to serialize errors.
What would be the best solution around this?
Beta Was this translation helpful? Give feedback.
All reactions