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

SPQR does not work well with Java records with a nondefault constructor #515

Open
lukas-krecan opened this issue Oct 10, 2024 · 0 comments

Comments

@lukas-krecan
Copy link

See this example The code contains a generic class referenced by a Java record with an additional constructor.

If complied with:

  • Java 17 - it starts but it ignores the annotations on the generic class RangeFilter
  • Java 21, 22 it does not even start complaining about Caused by: io.leangen.graphql.metadata.exceptions.TypeMappingException: Type io.leangen.graphql.samples.dto.FilterInput$RangeFilter is unbounded or missing generic type parameters
  • In Java 23 it starts, I did not check if the generated schema is correct

As a workaround it helps to drop non-default constructor from Java records or to not use records at all.

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

1 participant