Home

Awesome

<!--ts--> <!--te-->

What is it?

The GraphQL Java Generator makes it easy to work in Java with graphQL in a schema first approach.

This project is a code generator, that allows to quickly develop GraphQL clients and GraphQL servers in java, based on a GraphQL schema.

That is: graphql-java-generator generates the boilerplate code, and lets you concentrate on what's specific to your use case.

Other points that are worth to point out:

Two main versions: 1.x and 2.x

The 1.x version:

The 2.x version: About to be released (TODO: update this when 2.x is released)

Availability: Maven and Gradle

The generator is currently available both as a Maven plugin and as a Gradle plugin:

The plugin documentation, generated by maven, is available on this page. It lists all the plugin goals and their parameters. It is valid for both Maven and Gradle.

The plugin goals/tasks

All maven goals and gradle tasks are described on this page

This plugin contains these goals (Maven) / tasks (Gradle):

The Documentation

The full documentation is available on the github wiki.

You can also:

Compatibility with GraphQL

This plugin respects all the GraphQL specifications:

Change log

The Change Log is available here

Note for contributors

All the plugin logic is stored in the graphql-maven-plugin-project project.

The Maven plugin and the Gradle plugin are just wrapper for the plugin logic, available in the graphql-maven-plugin-logic module of the maven project.

If you want to compile the maven project, you'll have to add the lombok.jar file in your IDE. Please see the relevant section, in the Install menu of the https://projectlombok.org/ home page. This very nice tools generates all java boiler plate code, like setters, getters, constructors from fields...

If you use eclipse, please use the code formatter given with the project (file graphql-java-generator (eclipse code formatter).xml at the root of the project). This allows to have the sample code formatting: the code is then homogeneous, and the comparison between versions is simpler. To do this, go to the eclipse preferences, select Java/Code Style/Formatter, and import this file. Then, in the Java/Editor/Save Actions, check the "Perform the selected action on save", "Format source code", "Format all lines", "Organize imports" and "Additional actions" which its default content

License

graphql-java-generator is licensed under the MIT License. See LICENSE for details.