retryOnErrorInterceptor
Sets the ApolloInterceptor used to retry or fail fast a request. The interceptor may use ApolloRequest.retryOnError and ApolloRequest.failFastIfOffline.
By default ApolloClient uses a best effort interceptor that is not aware about network state.
Pass an instance of a com.apollographql.apollo.network.NetworkMonitor to RetryOnErrorInterceptor to add network state awareness:
apolloClient = ApolloClient.Builder()
.serverUrl("https://...")
.retryOnErrorInterceptor(RetryOnErrorInterceptor(networkMonitor))
.build()Content copied to clipboard
Parameters
retryOnErrorInterceptor
the ApolloInterceptor to use for retrying or null to use the default interceptor.