You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
public class Ab implements GraphQLQueryResolver {
@Data
@NoArgsConstructor
public static class A<T> {
private T e;
}
public ... find(A<B> c) {
return ...
}
}
I have the exception below:
Caused by: java.lang.ClassCastException: sun.reflect.generics.reflectiveObjects.TypeVariableImpl cannot be cast to java.lang.Class
at com.coxautodev.graphql.tools.UtilsKt.unwrap(Utils.kt:34)
at com.coxautodev.graphql.tools.GenericType$RelativeTo.parameterizedDeclaringTypeOrSuperType(GenericType.kt:116)
at com.coxautodev.graphql.tools.GenericType$RelativeTo.unwrapGenericType(GenericType.kt:98)
at com.coxautodev.graphql.tools.TypeClassMatcher.match(TypeClassMatcher.kt:34)
at com.coxautodev.graphql.tools.TypeClassMatcher.match(TypeClassMatcher.kt:28)
at com.coxautodev.graphql.tools.SchemaClassScanner.handleNewType(SchemaClassScanner.kt:348)
at com.coxautodev.graphql.tools.SchemaClassScanner.handleFoundType(SchemaClassScanner.kt:328)
at com.coxautodev.graphql.tools.SchemaClassScanner.handleFoundType(SchemaClassScanner.kt:293)
at com.coxautodev.graphql.tools.SchemaClassScanner.scanResolverInfoForPotentialMatches(SchemaClassScanner.kt:268)
at com.coxautodev.graphql.tools.SchemaClassScanner.handleRootType(SchemaClassScanner.kt:119)
at com.coxautodev.graphql.tools.SchemaClassScanner.scanForClasses(SchemaClassScanner.kt:77)
at com.coxautodev.graphql.tools.SchemaParserBuilder.scan(SchemaParserBuilder.kt:165)
at com.coxautodev.graphql.tools.SchemaParserBuilder.build(SchemaParserBuilder.kt:206)
at com.oembedler.moon.graphql.boot.GraphQLJavaToolsAutoConfiguration.schemaParser(GraphQLJavaToolsAutoConfiguration.java:98)
at com.oembedler.moon.graphql.boot.GraphQLJavaToolsAutoConfiguration$$EnhancerBySpringCGLIB$$3d1621d9.CGLIB$schemaParser$0()
at com.oembedler.moon.graphql.boot.GraphQLJavaToolsAutoConfiguration$$EnhancerBySpringCGLIB$$3d1621d9$$FastClassBySpringCGLIB$$a377c22.invoke()
Fixed by #819 (same root cause as #468): generic input classes like A<B> now work as resolver arguments. That includes the same generic class used with different type arguments, and generic inputs nested inside other inputs. Covered by GenericInputTypesTest. This ships in 14.0.4.
Activity
Add regression tests for fixed issues
oryan-block commentedon Oct 3, 2026
Fixed by #819 (same root cause as #468): generic input classes like
A<B>now work as resolver arguments. That includes the same generic class used with different type arguments, and generic inputs nested inside other inputs. Covered byGenericInputTypesTest. This ships in 14.0.4.