Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generated code for nested input types with default values fails #636

Open
deweyjose opened this issue Jan 2, 2024 · 2 comments
Open

Generated code for nested input types with default values fails #636

deweyjose opened this issue Jan 2, 2024 · 2 comments

Comments

@deweyjose
Copy link

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'}}]};
} 
@srinivasankavitha
Copy link
Contributor

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.

@deweyjose
Copy link
Author

Hi @srinivasankavitha,

Not blocked currently, thanks for taking a look!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants