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

Java class generation fails on default value objects #103

Closed
a-sayyed opened this issue Nov 28, 2023 · 2 comments
Closed

Java class generation fails on default value objects #103

a-sayyed opened this issue Nov 28, 2023 · 2 comments

Comments

@a-sayyed
Copy link

hello @deweyjose and thanks for the awesome maven plugin!

We recently noticed a problem with Java class generation when our schema has something like

input SomeKindOfInput {
  nestedInput: NestedInput = {enumField : ENUM_VALUE1}
}

input NestedInput {
  enumField: SomeKindOfEnum!
}

where we attempt to give a field a default value of an object that has some field value.
The generated class is not a valid java class

public class SomeKindOfInput {
  private NestedInput nestedInput = ObjectValue{objectFields=[ObjectField{name='enumField', value=EnumValue{name='ENUM_VALUE1'}}]};
} 
@deweyjose
Copy link
Owner

Hi @a-sayyed - sorry for the delay.

I think this is a bug in the core DGS codegen library. I've created an issue in their repo.

@deweyjose
Copy link
Owner

Closing this for now. Lets revisit if DGS fixes.

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