Rx3Apollo with ApolloCall in java

Hi,

I am using Apollo3 with Java.
Since the apolloClient.query(new TestQueriesQuery()).execute() is not supported in java i am using Rx3 libraries.

After i initialise apolloCall as below using the library com.apollographql.apollo3.ApolloCall
ApolloCall apolloCall = apolloClient.query(new TestQueriesQuery());
But when i try to get the observable using the Rx3 using the below command

Rx3Apollo. from (apolloCall);

fails with the error :

Multiple markers at this line
The method from(ApolloQueryWatcher) in the type Rx3Apollo is not applicable for the arguments *
(ApolloCall<TestQueriesQuery.Data>)
Observable cannot be resolved to a type

Note: If we use Apollo client 2.5.11 this works fine but we wanted to use the latest version. Is there any solution for this.

Hi! :wave:

It looks like the compiler is still seeing the signature from 2.x - could it be that you are still depending on the 2.x Rx dependency? For 3.x is should be implementation("com.apollographql.apollo3:apollo-rx3-support:3.1.0").

PS: .from still exists in 3.x but is deprecated and superceded by .single or .flowable depending on your use-case.

1 Like

@Krishna_Jayanth Thanks for raising this concern. I was curious, what does your application do exactly? Are you using Java for Mobile Android development, or is this something else all together? Any additional information would help us tremendously to better understand your use case here. Thank you!