Netflix / dgs-codegen

Apache License 2.0
184 stars 99 forks source link

omitNullInputFields does not work #404

Open MartinKanters opened 2 years ago

MartinKanters commented 2 years ago

Hi all, thanks for all the great work you are doing!

As the generated DSL only generates fields without input fields or with all input fields, we are trying to make use of the omitNullInputFields flag to ensure that we can skip some of them. Unfortunately it seems that the field omitNullInputFields does not seem to work (anymore?). A quick search in the codebase does not yield a lot of results either..

Is it still supported?

We are running on the latest versions:

srinivasankavitha commented 2 years ago

Is this a kotlin or java project? Also could you provide, so we can an example that fails for you so we can accurately reproduce and verify the fix? Thanks so much!

MartinKanters commented 2 years ago

Sure thing, here is the demo project. It is a Java project by the way, but I don't think it matters. As we are using Maven we are using deweyjose's codegen plugin. This is just a small wrapper around your codegen library, as you can see here

When you run the demo, it will output the serialized query string and fail with an exception if the null input argument is present.