public interface HandlerMethodArgumentResolver
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.
Modifier and Type | Method and Description |
---|---|
Object |
resolveArgument(MethodParameter parameter,
DataFetchingEnvironment environment)
Resolve a method parameter to a value.
|
boolean |
supportsParameter(MethodParameter parameter)
Whether this resolver supports the given
MethodParameter . |
boolean supportsParameter(MethodParameter parameter)
MethodParameter
.@Nullable Object resolveArgument(MethodParameter parameter, DataFetchingEnvironment environment) throws Exception
parameter
- the method parameter to resolve. This parameter must
have previously checked via supportsParameter(org.springframework.core.MethodParameter)
.environment
- the environment to use to resolve the valuenull
if not resolved;
the value may also be a Mono
if it
requires asynchronous resolution.Exception
- in case of errors with the preparation of argument values