When defining a GraphQL handler method in a generic interface, @Argument annotations on its parameters are not correctly detected by the framework if the interface is implemented by a concrete class (especially when bridging methods are involved).
See the following:
interface UserController<A, B> {
User fetchUser(@Argument A arg1, @Argument B arg2);
}
abstract class AbstractUserController<C> implements UserController<Long, C> {
@Override
public User fetchUser(Long arg1, C arg2) {
}
}
class ConcreteUserController extends AbstractUserController<String> {
}
When resolving the handler method for ConcreteUserController, the framework fails to find the @Argument annotations on the parameters.
The root cause appears to be in HandlerMethod bridged method matching logic, because it fails to match the erased types of the bridged method.
When defining a GraphQL handler method in a generic interface,
@Argumentannotations on its parameters are not correctly detected by the framework if the interface is implemented by a concrete class (especially when bridging methods are involved).See the following:
When resolving the handler method for
ConcreteUserController, the framework fails to find the@Argumentannotations on the parameters.The root cause appears to be in
HandlerMethodbridged method matching logic, because it fails to match the erased types of the bridged method.