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.
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.
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]GraphQL Java v26.1 README(2026-10-04)
- [2]GraphQL Java v26.1 release(2026-10-04)
- [3]GraphQL execution entry point(2026-10-04)
- [4]SchemaParser source(2026-10-04)
- [5]RuntimeWiring source(2026-10-04)
- [6]Instrumentation SPI source(2026-10-04)
- [7]GraphQL Java v26.1 build configuration(2026-10-04)
- [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
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
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
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
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
Related information
Write a related articleShare a guide or use case for this OSS in Markdown. Articles are published after administrator approval.
Explore next
- Firecrawl188,329 Stars
1 shared tag(s) · 1 shared category(s)
a web context API for search, scraping, crawling, and browser interaction
TypeScript - Axios109,258 Stars
1 shared tag(s) · 1 shared category(s)
Share interceptors, adapters, timeouts, and cancellation across browser and Node.js HTTP requests
JavaScript - FastAPI102,797 Stars
1 shared tag(s) · 1 shared category(s)
Unify validation, dependency injection, and OpenAPI around Python type declarations
Python - Flask74,844 Stars
1 shared tag(s) · 1 shared category(s)
build Python WSGI applications with routing, request handling, and Jinja templates
Python - LiteLLM60,101 Stars
1 shared tag(s) · 1 shared category(s)
unify 100+ LLM providers behind OpenAI-compatible interfaces and centralize routing, cost controls, guardrails, and logging in an AI gateway
Python - GitHub CLI46,526 Stars
1 shared tag(s) · 1 shared category(s)
work with pull requests, issues, repositories, and the GitHub API through
Goghas part of terminal-first development workflows
Report incorrect information
Tell us if any listing information is incorrect or outdated.