There’s a few clients available, all taking different approaches.
- Apollo Android – Originally intended for Android, but equally usable in any Java project. Someone also made a Maven plugin for it.
- Shopify’s GraphQL Java gen – Similar to what
wsdl2java does, for example, but not wrapped into a Maven plugin.
Generates a nice client, but requires Ruby… It’s worth investigating if the Ruby dependency can be satisfied using JRuby JAR. - Nodes A GraphQL JVM Client designed for constructing queries from standard model definitions. By American Express
- Manifold can be used as a GraphQL client
- graphql-kotlin GraphQL Kotlin provides a set of lightweight type-safe GraphQL HTTP clients. The library provides Ktor HTTP client and Spring WebClient based reference implementations as well as allows for custom implementations using other engines. Type-safe data models are generated at build time by the GraphQL Kotlin Gradle and Maven plugins.