Class ArgumentsMethodArgumentResolver
java.lang.Object
org.springframework.graphql.data.method.annotation.support.ArgumentsMethodArgumentResolver
- All Implemented Interfaces:
HandlerMethodArgumentResolver
public class ArgumentsMethodArgumentResolver
extends Object
implements HandlerMethodArgumentResolver
Resolver for a method parameter that is annotated with
@Arguments
, similar to what
ArgumentMethodArgumentResolver
does but using the full
full GraphQL arguments
map as the source for binding to the target Object rather than a specific
argument value within it.- Since:
- 1.0.0
- Author:
- Rossen Stoyanchev
- See Also:
-
Constructor Summary
Constructors -
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
.
-
Constructor Details
-
ArgumentsMethodArgumentResolver
-
-
Method Details
-
supportsParameter
Description copied from interface:HandlerMethodArgumentResolver
Whether this resolver supports the givenMethodParameter
.- Specified by:
supportsParameter
in interfaceHandlerMethodArgumentResolver
-
resolveArgument
public Object resolveArgument(MethodParameter parameter, DataFetchingEnvironment environment) throws Exception Description copied from interface:HandlerMethodArgumentResolver
Resolve a method parameter to a value.- Specified by:
resolveArgument
in interfaceHandlerMethodArgumentResolver
- Parameters:
parameter
- the method parameter to resolve. This parameter must have previously checked viaHandlerMethodArgumentResolver.supportsParameter(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
-