A simple graphql schema to pojo generator for java. Doesn't depend on any other graphql / java frameworks.
👤 Suraj Muraleedharan
- Github: @surajcm
Contributions, issues and feature requests are welcome!
Feel free to check issues page.
If you contribute please commit to a new branch and explain details in your pull request not in your commit.
Remember to abide by code of conduct , which we adapted from Code of Conduct
Give a ⭐️ if this project helped you!
<build>
<plugins>
...
<plugin>
<groupId>com.github.surajcm</groupId>
<artifactId>graphql-pojo-maven-plugin</artifactId>
<version>1.0.0</version>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<schema>src/main/resources/schema.graphqls</schema>
<outputDir>${project.build.directory}/src/main/java/</outputDir>
<packageName>com.company.project.schema</packageName>
</configuration>
</execution>
</executions>
</plugin>
...
</plugins>
</build>
* Both schema
and outputDir
are optional, and they default to the values provided in the sample above
The plugin will run automatically as part of the maven lifecycle when compiling your code , also you can run the plugin manually with mvn generate-sources
.