Graphitron is a code generation tool that creates source code by linking GraphQL schemas to underlying database models. Developed by Sikt – the Norwegian Agency for Shared Services in Education and Research, the tool generates precise source code for our systems, ensuring maintainability over time.
Graphitron is used as a Maven plugin, offering two main functionalities:
- Java Code Generation: Creates Java source code from GraphQL schemas.
- Schema Transformation: Modifies GraphQL schemas based on various configurations.
New to Graphitron? Start with the documentation guide for conceptual understanding:
- Vision and Goal - What problem Graphitron solves and why
- Graphitron Principles - Design philosophy for building systems that last decades
- Code Generation Triggers - Schema patterns → what gets generated
Ready to use Graphitron? See the technical reference documentation:
- Online documentation
- Tutorial - A fresh checkout to a working GraphQL query against the Sakila example
- How-to guides - Day-to-day recipes: joins, conditions, mutations, services, pagination, errors, federation
- Reference - Every directive, Maven plugin parameter, runtime API entry point, and diagnostic code
- Example project README - A runnable Quarkus + JAX-RS reference application
The repo root is a single Maven reactor. Build it with the local-db profile
(which switches jOOQ codegen to a native PostgreSQL; see CLAUDE.md for the
catalog-jar footgun):
mvn install -Plocal-dbSee the Tutorial for the end-to-end build and query flow.