Closed simPod closed 2 years ago
Hi 👋 Looks like you're using Java ? If that's the case, you're safest bet is to use the RxJava interop:
ApolloCall<MyQuery.Data> queryCall = client.query(new MyQuery());
Single<ApolloResponse<MyQuery.Data>> queryResponse = Rx2Apollo.single(queryCall);
queryResponse.subscribe( /* ... */ );
This is because version 3 exposes coroutine APIs first so they are easier to use in Kotlin. But the side effect of that is that it is more cumbersome in java.
If you're not in a rush, I'd recommend waiting a bit before you migrate do 3.x. We have some plans to expose a better Java API that should give you more idiomatic APIs
I'll track the mentioned issue thank. Thanks!
Summary I'm trying to migrate from v2 to v3 so I took ApolloClient and want to execute query. However, the
execute()
method requires me to provide completionbut looking at
execute()
method it looks like it accepts no argsTried to actually build that fails
Version JDK 17
com.apollographql.apollo3:apollo-runtime:3.3.+ -> 3.3.0