Class InvocableHandlerMethodSupport
java.lang.Object
org.springframework.graphql.data.method.HandlerMethod
org.springframework.graphql.data.method.InvocableHandlerMethodSupport
- Direct Known Subclasses:
BatchLoaderHandlerMethod
,DataFetcherHandlerMethod
Extension of
HandlerMethod
that adds support for invoking the
underlying handler methods.- Since:
- 1.0.0
- Author:
- Rossen Stoyanchev
-
Nested Class Summary
Nested classes/interfaces inherited from class org.springframework.graphql.data.method.HandlerMethod
HandlerMethod.HandlerMethodParameter
-
Field Summary
Fields inherited from class org.springframework.graphql.data.method.HandlerMethod
logger
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
InvocableHandlerMethodSupport
(HandlerMethod handlerMethod, Executor executor) Create an instance. -
Method Summary
Modifier and TypeMethodDescriptionprotected Object
doInvoke
(GraphQLContext graphQLContext, Object... argValues) Invoke the handler method with the given argument values.protected reactor.core.publisher.Mono<Object[]>
toArgsMono
(Object[] args) Use this method to resolve the arguments asynchronously.Methods inherited from class org.springframework.graphql.data.method.HandlerMethod
assertTargetBean, createWithResolvedBean, equals, findProvidedArgument, formatArgumentError, formatInvokeError, getBean, getBeanType, getBridgedMethod, getMethod, getMethodAnnotation, getMethodParameters, getReturnType, getReturnValueType, getShortLogMessage, hashCode, hasMethodAnnotation, isVoid, toString
-
Constructor Details
-
Method Details
-
doInvoke
Invoke the handler method with the given argument values.- Parameters:
argValues
- the values to use to invoke the method- Returns:
- the value returned from the method or a
Mono<Throwable>
if the invocation fails.
-
toArgsMono
Use this method to resolve the arguments asynchronously. This is only useful when at least one of the values is aMono
-