public class InvocableHandlerMethod extends HandlerMethod
HandlerMethod that can resolve method arguments from a
DataFetchingEnvironment and invoke the method.HandlerMethod.HandlerMethodParameterlogger| Constructor and Description |
|---|
InvocableHandlerMethod(HandlerMethod handlerMethod,
HandlerMethodArgumentResolverComposite resolvers) |
| Modifier and Type | Method and Description |
|---|---|
protected Object |
doInvoke(Object... args)
Invoke the handler method with the given argument values.
|
protected Object[] |
getMethodArgumentValues(DataFetchingEnvironment environment,
Object... providedArgs)
Get the method argument values for the current request, checking the provided
argument values and falling back to the configured argument resolvers.
|
HandlerMethodArgumentResolverComposite |
getResolvers()
Return the configured argument resolvers.
|
Object |
invoke(DataFetchingEnvironment environment)
Invoke the method after resolving its argument values in the context of
the given environment.
|
assertTargetBean, createWithResolvedBean, equals, findProvidedArgument, formatArgumentError, formatInvokeError, getBean, getBeanType, getBridgedMethod, getMethod, getMethodAnnotation, getMethodParameters, getReturnType, getReturnValueType, getShortLogMessage, hashCode, hasMethodAnnotation, isVoid, toStringpublic InvocableHandlerMethod(HandlerMethod handlerMethod, HandlerMethodArgumentResolverComposite resolvers)
public HandlerMethodArgumentResolverComposite getResolvers()
@Nullable public Object invoke(DataFetchingEnvironment environment) throws Exception
Argument values are commonly resolved through
HandlerMethodArgumentResolvers.
The providedArgs parameter however may supply argument values to
be used directly, i.e. without argument resolution. Provided argument
values are checked before argument resolvers.
environment - the GraphQL DataFetchingEnvironmentException - raised if no suitable argument resolver can be found,
or if the method raised an exceptiongetMethodArgumentValues(graphql.schema.DataFetchingEnvironment, java.lang.Object...),
doInvoke(java.lang.Object...)protected Object[] getMethodArgumentValues(DataFetchingEnvironment environment, Object... providedArgs) throws Exception
The resulting array will be passed into doInvoke(java.lang.Object...).
Exception