An annotations-based syntax library for defining GraphQL schemas in Java, reducing verbosity compared to plain graphql-java.
GraphQL-Java Annotations is a library that provides an annotation-based syntax for defining GraphQL schemas in Java. It simplifies the process of creating GraphQL types, fields, and directives by allowing developers to annotate Java classes and methods, reducing the verbosity of using plain graphql-java directly.
Java developers building GraphQL APIs who want a more concise and maintainable way to define schemas without manually constructing verbose graphql-java objects.
It offers a declarative, annotation-driven approach that integrates seamlessly with graphql-java, reducing boilerplate code while providing features like custom directives, Relay support, and type extensions for modular schema design.
GraphQL Annotations for Java
Reduces graphql-java verbosity by allowing GraphQL types and fields to be defined directly on Java classes with annotations like @GraphQLField, as shown in the object definition examples.
Supports type extensions with @GraphQLTypeExtension, enabling schemas to be split across multiple classes for better maintainability, similar to IDL's extend keyword.
Facilitates creating and wiring GraphQL directives using Java annotations, with detailed examples for wiring logic like UpperWiring in the directive support section.
Built-in support for Relay specifications with annotations like @GraphQLConnection and @GraphQLRelayMutation, including customizable Relay implementations and pagination helpers.
Extensions must be registered before the main type is created using registerTypeExtension, which can lead to initialization order bugs and increased setup complexity.
Requires the -parameters javac option for method argument names to be used as GraphQL field names by default, adding a build configuration hurdle that's easy to overlook.
The annotation-based approach is static, making it unsuitable for schemas that need to be generated or modified dynamically at runtime, as admitted in the reliance on pre-defined classes.
GraphQL Java implementation
GraphQL for Java with Spring Boot made easy.
Manifold is a Java compiler plugin, its features include Metaprogramming, Properties, Extension Methods, Operator Overloading, Templates, a Preprocessor, and more.
GraphQL and GraphiQL Spring Framework Boot Starters - Forked from oembedler/graphql-spring-boot due to inactivity.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.