I am trying to implement a GraphQL client in Java. From the documentation I see that Apollo is supposed to work with Java (see here). What I don’t understand is, do I need RxJava for this to work or is there a pure Java version? For now, I don’t require asynchronous access so a synchronous Java version would do just fine.
This far I have generated Java sources for a GraphQL schema & query and initialized a client. I am now struggling to execute the query:
ApolloResponse response = apolloClient.query(new MyQuery()).execute();
- Is a pure Java client version supported? (i.e., without RxJava)
- If so, how do I execute the query?
- And, where do I get the type info? (i.e.
Also, if you know of a full Java example somewhere, please share.