OSS TanbouSign in with GitHub

implement the GraphQL specification on the JVM with composable schema, execution, and instrumentation APIs

About these scores

OSS scale score is an unbounded metric that log-compresses and weights Stars, Watchers, Forks, and Contributors. Discovery score is the current OSS scale score minus the score at discovery. Update pace is commits in the last 30 days, growth momentum is the OSS scale score difference within the recent observation window, and OSS health is a 0–100 rating based on available recency, Community Health, and release data.

Stars
6,220
Primary language
Java
License
MIT
Repository last updated
Oct 2, 2026
On this page

Overview

GraphQL Java is a core Java implementation of the GraphQL specification. It can parse SDL into a schema, connect DataFetchers through runtime wiring, and execute queries through the GraphQL engine while remaining independent from any particular HTTP transport or web framework.

Features and best fit

Based on official documentation; not hands-on tested · Content checked:

Key features

Build the query execution pipeline around GraphQLSchema

graphql.GraphQL is the query-execution entry point, combining schema, execution strategies, validation, and related runtime pieces to produce an ExecutionResult.

Sources: [3]

Parse SDL and wire DataFetchers, scalars, and type resolvers

SchemaParser turns SDL into a TypeDefinitionRegistry, while RuntimeWiring registers DataFetchers, custom scalars, type resolvers, and related runtime behavior for an executable schema.

Sources: [4][5]

Observe and extend execution stages through Instrumentation

The Instrumentation SPI hooks into execution lifecycle stages for measurements, logging, validation-related behavior, and field-fetch observation. Because execution can cross threads, instrumentation code must account for thread safety.

Sources: [6]

Best fit

Fits Java applications that want a GraphQL engine independent of a specific transport layer

It works well when an existing Java service needs GraphQL execution without coupling the core engine to Spring or another HTTP framework, allowing framework integration to remain a separate layer.

Sources: [1][3]

Before adoption

Version 26.1 is a bugfix release for the 26 line with no breaking changes

The 26.1 release collects fixes for SDL validation, schema rebuilding, subscription context handling, and related issues without introducing breaking changes over 26.0.

Sources: [2]

Consumer bytecode targets Java 11 while repository builds use a Java 25 toolchain

The v26.1 Gradle build uses a Java 25 toolchain and releases bytecode for Java 11. Application runtime requirements therefore differ from the JDK needed to build or contribute to the repository itself.

Sources: [7]

Official sources

  1. [1]GraphQL Java v26.1 README(2026-10-04)
  2. [2]GraphQL Java v26.1 release(2026-10-04)
  3. [3]GraphQL execution entry point(2026-10-04)
  4. [4]SchemaParser source(2026-10-04)
  5. [5]RuntimeWiring source(2026-10-04)
  6. [6]Instrumentation SPI source(2026-10-04)
  7. [7]GraphQL Java v26.1 build configuration(2026-10-04)
  8. [8]GraphQL Java MIT license(2026-10-04)
Supplemental curator note

graphql-java is the core GraphQL execution engine. HTTP transport and Spring integration are separate layers, so server framework, authentication, and authorization remain application concerns.

Try it in 3 steps

  1. 1

    Create a minimal Maven project for GraphQL Java 26.1

    Pin 26.1 in an isolated Maven project compiled against the Java 11 consumer baseline.

    mkdir -p graphql-java-demo/src/main/java/demo && printf '%s\n' '<project xmlns="http://maven.apache.org/POM/4.0.0">' '<modelVersion>4.0.0</modelVersion>' '<groupId>demo</groupId><artifactId>graphql-java-demo</artifactId><version>1.0.0</version>' '<properties><maven.compiler.release>11</maven.compiler.release></properties>' '<dependencies><dependency><groupId>com.graphql-java</groupId><artifactId>graphql-java</artifactId><version>26.1</version></dependency></dependencies>' '</project>' > graphql-java-demo/pom.xml
  2. 2

    Build a minimal schema from SDL and a DataFetcher

    Exercise the basic SchemaParser, RuntimeWiring, DataFetcher, and GraphQL execution flow.

    printf '%s\n' 'package demo;' 'import graphql.GraphQL;' 'import graphql.ExecutionResult;' 'import graphql.schema.GraphQLSchema;' 'import graphql.schema.idl.*;' 'public class Main {' ' public static void main(String[] args) {' ' var types = new SchemaParser().parse("type Query { hello: String }");' ' var wiring = RuntimeWiring.newRuntimeWiring().type("Query", t -> t.dataFetcher("hello", e -> "world")).build();' ' GraphQLSchema schema = new SchemaGenerator().makeExecutableSchema(types, wiring);' ' ExecutionResult result = GraphQL.newGraphQL(schema).build().execute("{ hello }");' ' System.out.println(result.toSpecification());' ' }' '}' > graphql-java-demo/src/main/java/demo/Main.java
  3. 3

    Compile and inspect the query result

    Execute { hello } directly through the core library without starting an HTTP server.

    cd graphql-java-demo && mvn -q compile dependency:build-classpath -Dmdep.outputFile=cp.txt && java -cp "target/classes:$(cat cp.txt)" demo.Main
Check the official README

Growth

Growth trends · Last 30 days

6,220 Stars

Trend data is still being collected.

Development activity

Last 90 days · weekly

Commits (last 30 days)
15
Open PRs
24

Development activity is still being collected.

Built with

Categories and tags

Categories

GitHub data

GitHub dataView detailed GitHub data

GitHub Topics

  • graphql
  • graphql-java
  • java
Stars
6,220
Forks
1,142
Watchers
193
Open issues
25
Contributors
239
Owner type
Organization
Primary language
Java
License
MIT
Repository last updated
Oct 2, 2026
Write a related article

Share a guide or use case for this OSS in Markdown. Articles are published after administrator approval.

Report incorrect information

Tell us if any listing information is incorrect or outdated.

After reading this page, do you know what to do next?