A Java library for rapid development of GraphQL APIs using a code-first approach.
GraphQL SPQR is a Java library designed for quickly building GraphQL APIs by generating the GraphQL schema directly from Java code. It solves the problem of schema duplication and cumbersome refactoring in statically typed languages by adopting a code-first approach, allowing developers to define their schema in Java with full compiler support.
Java developers building GraphQL APIs, especially those working on legacy projects or seeking rapid prototyping without boilerplate. It's also suitable for teams introducing GraphQL into existing Java codebases.
Developers choose GraphQL SPQR for its minimal setup, deep configurability, and ability to keep the GraphQL schema synchronized with the Java model. Its code-first approach reduces duplication, eases refactoring, and integrates seamlessly into existing projects without requiring changes to business logic.
Build a GraphQL service in seconds
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
As shown in the 'Hello world' example, generating a GraphQL schema requires only a few lines of code, enabling rapid prototyping with minimal boilerplate.
Derives the GraphQL schema directly from Java classes, automatically keeping model and schema in sync to ease refactoring and reduce duplication, as emphasized in the code-first approach.
Can expose existing Java services through GraphQL without modifying original code, using optional annotations or configuration, making it ideal for introducing GraphQL into mature codebases.
Described as 'deeply configurable and not opinionated,' it offers extensible hooks and adapters, allowing customization to fit diverse project needs beyond default mappings.
Primarily designed for Java, with known issues for Kotlin requiring specific compiler flags, and no support for other JVM languages or polyglot environments, limiting versatility.
For optimal use, relies on compiler flags like -parameters or explicit annotations to retain parameter names, adding build configuration complexity or potential boilerplate in code.
The Spring Boot starter is noted as 'very young' in the README, indicating it may lack maturity, stability, or features compared to established alternatives in the GraphQL Java ecosystem.