dgs-codegen
dgs-codegen copied to clipboard
Generated code for nested input types with default values fails
This issue was originally found in the maven plugin implementation of codegen.
input SomeKindOfInput {
nestedInput: NestedInput = {enumField : ENUM_VALUE1}
}
input NestedInput {
enumField: SomeKindOfEnum!
}
Generates an invalid Java file:
public class SomeKindOfInput {
private NestedInput nestedInput = ObjectValue{objectFields=[ObjectField{name='enumField', value=EnumValue{name='ENUM_VALUE1'}}]};
}
Thanks for reporting @deweyjose. We will look into a fix in the coming weeks. In the meantime, if you are blocked, please feel free to open a PR.
Hi @srinivasankavitha,
Not blocked currently, thanks for taking a look!