Neal Sanche
11/04/2021, 10:09 PMval networkTransport = HttpNetworkTransport(
connectTimeoutMillis = 5_000,
readTimeoutMillis = 60_000,
serverUrl = "${config.serverUrl}/graphql",
interceptors = listOf(
BearerTokenInterceptor(tokenProvider = object :
com.apollographql.apollo3.network.http.TokenProvider {
override suspend fun currentToken(): String {
return config.tokenProvider.currentToken()
}
override suspend fun refreshToken(previousToken: String): String {
return config.tokenProvider.refreshToken(previousToken)
}
})
)
)
Specifically note the connect timeout, which differs from the default 60 seconds. This used to work on Android and iOS until migrating to the 3.0.0beta builds. What we discovered today was a particular call, which we know takes a bit over 30 seconds, was failing on iOS, however most of the other mutations we have succeeded. So we tried changing the connectTimeout to 60_000 instead, and that succeeded. I haven't verified, but suspect, this means that the iOS networking call might be using connect timeout instead of read timeout, or something like that. Just thought I'd report it here. Can also report on the github if preferred.mbonnin
11/04/2021, 10:56 PMNeal Sanche
11/05/2021, 3:03 PMmbonnin
11/09/2021, 1:45 PMreadTimeout
always for iOS. The PR above fixes that