You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using AppSync with React Native / Expo to have offline capabilities.
It works fine when I switch off/on internet access on my phone.
Nevertheless, when I switch back on to be connected to a wifi with no internet connection, my application slow down and becomes unusable.
AppSync seems to try to send many times stored mutations and causes this issue.
When I look into the code, I see that AppSync is based on redux-offline and retries a factor of 100 ms.
By default Redux offline is less eager.
Its default implementation uses the following schedule to retry requets:
After 1 seconds
After 5 seconds
After 15 seconds
After 30 seconds
After 1 minute
After 3 minutes
After 5 minutes
After 10 minutes
After 30 minutes
After 1 hour
We would like to configure network detection. When we look in redux-offline configuration, there is a detectNetwork method that can be used :
I am going to label this as a feature request, we've been slowly exposing more control over this kind of stuff (e.g. cvustom storage engines for redux-persist) and exposing a way to customize online detection sounds like a useful addition
I am using AppSync with React Native / Expo to have offline capabilities.
It works fine when I switch off/on internet access on my phone.
Nevertheless, when I switch back on to be connected to a wifi with no internet connection, my application slow down and becomes unusable.
AppSync seems to try to send many times stored mutations and causes this issue.
When I look into the code, I see that AppSync is based on redux-offline and retries a factor of 100 ms.
aws-mobile-appsync-sdk-js/packages/aws-appsync/src/link/retry-link.ts
Line 18 in b933379
By default Redux offline is less eager.
Its default implementation uses the following schedule to retry requets:
After 1 seconds
After 5 seconds
After 15 seconds
After 30 seconds
After 1 minute
After 3 minutes
After 5 minutes
After 10 minutes
After 30 minutes
After 1 hour
We would like to configure network detection. When we look in redux-offline configuration, there is a detectNetwork method that can be used :
https://github.com/redux-offline/redux-offline/blob/develop/docs/api/config.md#detectnetwork
I have seen a pull request for this ( #99 ). But it has not been merged.
After contacting AWS Support, the proposed solution is to use retryDelayOptions and customBackoff from AWS SDK.
What is the proper way to handle this issue ?
Thanks
The text was updated successfully, but these errors were encountered: