public class DataFetcherHandlerMethod extends InvocableHandlerMethodSupport
HandlerMethod for annotated handler methods adapted
to DataFetcher with DataFetchingEnvironment
as their input.HandlerMethod.HandlerMethodParameterlogger| Constructor and Description |
|---|
DataFetcherHandlerMethod(HandlerMethod handlerMethod,
HandlerMethodArgumentResolverComposite resolvers,
org.springframework.graphql.data.method.annotation.support.HandlerMethodValidationHelper validator,
Executor executor,
boolean subscription)
Constructor with a parent handler method.
|
| Modifier and Type | Method and Description |
|---|---|
HandlerMethodArgumentResolverComposite |
getResolvers()
Return the configured argument resolvers.
|
org.springframework.graphql.data.method.annotation.support.HandlerMethodValidationHelper |
getValidator()
Deprecated.
as of 1.1 without a replacement
|
Object |
invoke(DataFetchingEnvironment environment)
Invoke the method after resolving its argument values in the context of
the given
DataFetchingEnvironment. |
doInvoke, toArgsMonoassertTargetBean, createWithResolvedBean, equals, findProvidedArgument, formatArgumentError, formatInvokeError, getBean, getBeanType, getBridgedMethod, getMethod, getMethodAnnotation, getMethodParameters, getReturnType, getReturnValueType, getShortLogMessage, hashCode, hasMethodAnnotation, isVoid, toStringpublic DataFetcherHandlerMethod(HandlerMethod handlerMethod, HandlerMethodArgumentResolverComposite resolvers, @Nullable org.springframework.graphql.data.method.annotation.support.HandlerMethodValidationHelper validator, @Nullable Executor executor, boolean subscription)
handlerMethod - the handler methodresolvers - the argument resolversvalidator - the input validatorsubscription - whether the field being fetched is of subscription typepublic HandlerMethodArgumentResolverComposite getResolvers()
@Deprecated @Nullable public org.springframework.graphql.data.method.annotation.support.HandlerMethodValidationHelper getValidator()
@Nullable public Object invoke(DataFetchingEnvironment environment)
DataFetchingEnvironment.
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 DataFetchingEnvironment to use to
resolve arguments.Mono in case a method argument requires asynchronous resolution;
Mono<Throwable is returned if invocation fails.