@Target(value=PARAMETER) @Retention(value=RUNTIME) @Documented public @interface Argument
argument
onto a method parameter.
Binding is performed by mapping argument values to a primary data constructor of the expected method parameter type, or by using a default constructor to create it and then map values to its properties. This is applied recursively, using all nested values and creating nested target objects.
If binding fails, a BindException
is raised with binding issues
accumulated as field errors
where the
field
of each error is the argument path where the issue occurred.
If the method parameter is Map<String, Object>
and a parameter name is not specified, then the resolves value is the raw
arguments
map.
Note that this annotation has neither a "required" flag nor the option to specify a default value, both of which can be specified at the GraphQL schema level and are enforced by the GraphQL Java engine.
Arguments