Graphql-java (that you linked to) is an implementation of the GraphQL specification. As such, it is used to create GraphQL servers.
A client doesn't need anything special to consume a service, just like it doesn't need anything special to consume a REST service - only to be be able to speak HTTP. You can use any generic HTTP client you like.
Still, you have some more convenient options for creating clients (but both somewhat lacking):
- Apollo Android - Don't let the name fool you, it's perfectly usable from normal Java. Not the most ergonomic solution, but it works.
- Shopify's Graphql Java Generator - Unfortunately, requires Ruby to build (not to run, of course). Generates Java classes for creating queries in a type-safe way, similar to what wsdl2java Maven plugin does for SOAP services.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…