smallrye-graphql
smallrye-graphql copied to clipboard
Problems with Generics in quarkus 3
Currently migrating to quarkus 3. I am getting some errors, the same code works with quarkus 2.
public record InsertLangEntryGQLJ<T>(String lang, T record) {
@JsonbCreator
public InsertLangEntryGQLJ {
}
}
public record InsertTechnicalLocationInputJ(@Id String id,
List<@NonNull InsertLangEntryGQLJ<@NonNull InsertTechnicalLocationRecordGQLJ>> multiLangRecords) {
@JsonbCreator
public InsertTechnicalLocationInputJ {
}
}
Yasson fails here in org.eclipse.yasson.internal.ReflectionUtils#getRawType
In the reproducer there is a Kotlin and a Java version, both fail for quarkus 3 and work for quarkus 2. When switching between quarkus version, you need to change javax vs jakarta, and you should change the koltin version (both used version are in the pom as comment).
Mutation to trigger the error.
mutation testJava{
testJava(input:{
id: 0,
multiLangRecords: {
lang: "",
record: {
description: ""
}
},
})}