# graphqlcodegen-maven-plugin

A Maven plugin, ported from Netflix's DGS Gradle codegen plugin, that generates typed Java or Kotlin classes and client APIs from a project's GraphQL schema during the build.

graphqlcodegen-maven-plugin runs Netflix's DGS code generator as a Maven build step, reading schema files with a .graphql, .graphqls or .gqls extension, from a configured directory by default, and writing generated types, example data fetchers and typed client APIs into the build's generated-sources directory, which it adds to the project's compile path automatically. Beyond local files, it can also read schemas packaged inside dependency jars, fetch remote schema files over HTTP at build time, or pull a schema through a live GraphQL introspection request, in any combination.

The plugin binds to Maven's generate-sources phase by default and requires Java 17 or newer. A complete multi-module example project, covering a server, jar-embedded schemas, type mappings and live introspection, is included and built on every push.

It is published to Maven Central and licensed under MIT.

Website: https://github.com/deweyjose/graphqlcodegen
