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
{{ message }}
Repository navigation
Resolver parameter typed by the resolver's own type variable fails on every query #880
{ plain(input: { name: "a" }) } returns plain got GreetingInput(name=a), but { generic(input: { name: "a" }) } fails with:
Exception while fetching data (/generic) : class sun.reflect.generics.reflectiveObjects.TypeVariableImpl cannot be cast to class java.lang.Class
Same on graphql-java 26.1 and 25.1, on current master.
The scanner resolves I to GreetingInput through the type resolver, which is why the build works. The data fetcher doesn't. MethodFieldResolver#createDataFetcher keeps method.genericParameterTypes[i] as is (the ?.apply { typeResolver.getRawClass(this) } throws the resolved type away), then shouldValueBeConverted calls JavaType.unwrap(), which does this as Class<*>. ArgumentConverter is built with the unresolved I too, so I think fixing only the cast would hand the method a Map.
Not the same as #333 / #468, those were generic input classes (A<B>) failing at scan time.
Found by the every-field check in #879, which excludes Query.generic in UnmappedInputFieldsTest until this is fixed.
Activity