Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?


Failed to load latest commit information.
Latest commit message
Commit time
September 20, 2023 09:15
February 13, 2017 15:14
February 9, 2017 15:56
February 9, 2017 15:55
August 8, 2023 17:06
May 5, 2021 14:44
August 18, 2023 13:57
March 2, 2023 11:02

GraphQL Java Tools

Github Build Maven Central Discuss on GitHub

This library allows you to use the GraphQL schema language to build your graphql-java schema. Inspired by graphql-tools, it parses the given GraphQL schema and allows you to BYOO (bring your own object) to fill in the implementations. GraphQL Java Tools works well if you already have domain POJOs that hold your data (e.g. for RPC, ORM, REST, etc) by allowing you to map these "magically" to GraphQL objects.

GraphQL Java Tools aims for seamless integration with Java, but works for any JVM language. Try it with Kotlin!

We are looking for contributors!

Are you interested in improving our documentation, working on the codebase, reviewing PRs?

Reach out to us on GitHub and join the team!

Quick start

Using Gradle

Set the Kotlin version in your


Add the dependency:

compile 'com.graphql-java-kickstart:graphql-java-tools:13.1.0'

Using Maven

Set the Kotlin version in your <properties> section:


Add the dependency:



Take a look at our documentation for more details.

Why GraphQL Java Tools?

  • Schema First: GraphQL Java Tools allows you to write your schema in a simple, portable way using the GraphQL schema language instead of hard-to-read builders in code.
  • Minimal Boilerplate: It takes a lot of work to describe your GraphQL-Java objects manually, and quickly becomes unreadable. A few libraries exist to ease the boilerplate pain, including GraphQL-Java's built-in schema-first wiring, but none (so far) do type and datafetcher discovery.
  • Stateful Data Fetchers: If you're using an IOC container (like Spring), it's hard to wire up datafetchers that make use of beans you've already defined without a bunch of fragile configuration. GraphQL Java Tools allows you to register "Resolvers" for any type that can bring state along and use that to resolve fields.
  • Generated DataFetchers: GraphQL Java Tools automatically creates data fetchers for your fields that call the appropriate method on your java class. This means all you have to do to create a new field is add the field definition to your schema and add a corresponding method on your class.
  • Type->Class Discovery: GraphQL Java Tools starts from your root objects (Query, Mutation) and, as it's generating data fetchers for you, starts to learn about the classes you use for a certain GraphQL type.
  • Class Validation: Since there aren't any compile-time checks of the type->class relationship, GraphQL Java Tools will warn you if you provide classes/types that you don't need to, as well as erroring if you use the wrong Java class for a certain GraphQL type when it builds the schema.
  • Unit Testing: Since your GraphQL schema is independent of your data model, this makes your classes simple and extremely testable.

Known Issues

Known issues are aggregated at the wiki.