-
-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Retrying mutations on network failure #52
Comments
I found the parts about onDiscard, which resolves part the part of the issue where offline request would be discarded if they failed once online. However I've still the issue that a request which is being made (while online) fails due to connectivity issues, is not retried. Should this be handled by the library (in particular TypeError: Failed to fetch)? |
At the moment I have no retry logic in the library to leave the management at the network level |
Or in the |
whats from a user perspective (mine ;)) a bit odd is that a failed network request with a failed to fetch is behaving different than being offline. as well that if the request was scheduled offline and onDiscard returns false, it is going to be retried even if the network requests fails. i haven't figured yet out how to handle it well, in particular as the order is important of mutations on the same node. |
this is one of the reasons why I have not put retry logic inside the library but I have given the possibility to configure / customize each step of the offline workflow. |
but isn't the logic kind of implemented if the mutation is done while being 'offline'? from my perspective i'd love to have one path all mutations or queries take, independent of my current network or connectivity state. |
What you are asking for is NetInfo's isInternetReachable offline workflow management, which is currently not implemented. is it right? |
honestly i do not know netinfo, so hard to say ... |
At the moment the application is considered offline when the APIs made available in the WEB / react-native consider it as such (If there is an active network connection) While isInternetReachable defines whether the Internet is reachable with the currently active network connection. |
Hi Morries,
im currently testing the replay of mutations in case of network failure.
Pure offline/online mode works fine, however as soon as a network query fails that one is not replayed again.
The local store reflects the change, but it won't be communicated to the server.
Am I doing something wrong here, or is this intentional? I'm kinda looking for a retry strategy, the assumption is that users may have a flaky internet connection and requests my fail due to that but should be replayed later on.
The text was updated successfully, but these errors were encountered: