I have a Java app and I am using Apollo Plugin
plugins {
id 'com.apollographql.apollo' version '2.5.6'
}
I want to send 4 queries.
I want Apollo Client to send them all together, without waiting for reply from query1 before sending query2.
I am using
// client is create once and reused
ApolloClient apolloClient = ApolloClient.builder()
.serverUrl(graphQlHost + path)
.okHttpClient(httpClient)
.build();
apolloClient.query(query).enqueue(new ApolloCall.Callback<T>() {...})
However, from logs and from monitoring tools it seems that the calls are execute one after another.
I didn’t find an alternative to enqueue
method under ApolloClient class.
Is there a way to configure ApolloClient to send the requests as soon as they are “enqueued” or is it a single thread that reads from queue of requests and executes them sequentially?