graphql-java-generator / graphql-maven-plugin-project

graphql-maven-plugin is a Maven Plugin for GraphQL, based on graphql-java. It accelerates the development for both the client and the server, by generating the Java code. It allows a quicker development when in contract-first approach, by avoiding to code the boilerplate code.
https://graphql-maven-plugin-project.graphql-java-generator.com
MIT License
118 stars 47 forks source link

generate client code using graphql schemas located in jar dependency #129

Closed gpr7700 closed 2 years ago

gpr7700 commented 2 years ago

Hello

We are using the plugin and we are generating the client code for multiple functional domains. Each domain having its own folder under resources but it implies to copy/paste schemas between multiple projects

Is it possible to configure the plugin so that it uses the graphql schemas located in a jar dependency ?

Regards

Gregory

etienne-sf commented 2 years ago

To do this, you currently need to unzip the jar (typically in the target or buid folder), and use the schemaFileFolder parameter to indicate to the plugin where the GraphQL schema are. More info on the plugin doc page.

To unzip the jar, you can use the plugin Apache Maven Dependency Plugin, in its dependency:unpack

Etienne