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

extend input possible? #136

Closed mheidt closed 2 years ago

mheidt commented 2 years ago

Hi Etienne,

I am using multiple graphql files and hence used this a lot:

extend type Query {
    foo:bar
}

Now i would like to extend inputs as well. But unfortunately this doesn't work. The extended fields are missing in the generated code.

Does the spec say, that it should be possible? The code generator does't fail, if I have a construct like:

enum ApplicationFilterEnum {
    NAME
    SHORTNAME
    APPLICATION_TYPE_NAME
}

extend input ApplicationFilterField {
    name: ApplicationFilterEnum
}

I am using 1.18.3

mheidt commented 2 years ago

And while you are at it: extend enums is overwriting and not extending.

etienne-sf commented 2 years ago

I'll add tests for all possible ´extend´ use. And I fear, like you stated, that some corrections will need to be shipped with...

etienne-sf commented 2 years ago

This is now available in the 1.18.7 release