Hi Team,
I’ve the apollo client with httpBatching
disabled by default:-
val apolloClient = ApolloClient
.Builder()
.serverUrl(mockWebServer.url("/").toString())
.okHttpClient(get<OkHttpClient>())
.addCustomScalarAdapter(Date.type, dateCustomTypeAdapter)
.addInterceptor(HttpRequestHeadersInterceptor())
.httpBatching(10, 10, false)
.build()
My assumption is that if I execute operations below using the client defined above, they would not be batched.
val result1 = async {
apolloClient.query(GetLaunchQuery()).execute()
}
val result2 = async {
delay(50)
apolloClient.query(GetLaunch2Query()).execute()
}
But what I notice is that these operations are batched. Is this expected?
Based on my understanding they shouldn’t, because the apolloClient
does not have batching enabled by default.
I just wanted to make sure my understanding is correct.