Interface HandlerMethodArgumentResolver
- All Known Implementing Classes:
ArgumentMethodArgumentResolver
,ArgumentsMethodArgumentResolver
,AuthenticationPrincipalArgumentResolver
,ContextValueMethodArgumentResolver
,ContinuationHandlerMethodArgumentResolver
,DataFetchingEnvironmentMethodArgumentResolver
,DataLoaderMethodArgumentResolver
,HandlerMethodArgumentResolverComposite
,LocalContextValueMethodArgumentResolver
,PrincipalMethodArgumentResolver
,ProjectedPayloadMethodArgumentResolver
,ScrollSubrangeMethodArgumentResolver
,SortMethodArgumentResolver
,SourceMethodArgumentResolver
,SubrangeMethodArgumentResolver
public interface HandlerMethodArgumentResolver
Strategy interface for resolving method parameters into argument values in
the context of a given
DataFetchingEnvironment
.
Most implementations will be synchronous, simply resolving values from the
DataFetchingEnvironment
. However, a resolver may also return a
Mono
if it needs to be asynchronous.
- Since:
- 1.0.0
- Author:
- Rossen Stoyanchev
-
Method Summary
Modifier and TypeMethodDescriptionresolveArgument
(MethodParameter parameter, DataFetchingEnvironment environment) Resolve a method parameter to a value.boolean
supportsParameter
(MethodParameter parameter) Whether this resolver supports the givenMethodParameter
.
-
Method Details
-
supportsParameter
Whether this resolver supports the givenMethodParameter
. -
resolveArgument
@Nullable Object resolveArgument(MethodParameter parameter, DataFetchingEnvironment environment) throws Exception Resolve a method parameter to a value.- Parameters:
parameter
- the method parameter to resolve. This parameter must have previously checked viasupportsParameter(org.springframework.core.MethodParameter)
.environment
- the environment to use to resolve the value- Returns:
- the resolved value, which may be
null
if not resolved; the value may also be aMono
if it requires asynchronous resolution. - Throws:
Exception
- in case of errors with the preparation of argument values
-