@@ -367,8 +367,9 @@ nested argument values to invoke the constructors of nested target objects. For
367
367
Alternatively, binding can also be done by invoking a default constructor first, and then
368
368
applying argument values via setters on the target object.
369
369
370
- TIP: If the target object doesn't have setters, and you can't change that, you can
371
- configure the argument binder to fall back on binding via direct field access.
370
+ TIP: If the target object doesn't have setters, you can configure the argument binder to
371
+ fall back on binding via direct field access, see
372
+ xref:controllers.adoc#controllers.schema-mapping.argument.binding[].
372
373
373
374
By default, if the method parameter name is available, for example with the `-parameters`
374
375
compiler flag in Java 8+ or with debugging info from the compiler, it is used to look up
@@ -404,6 +405,25 @@ annotation. For access to the full arguments map, please use
404
405
xref:controllers.adoc#controllers.schema-mapping.arguments[`@Arguments`] instead.
405
406
406
407
408
+ [[controllers.schema-mapping.argument.binding]]
409
+ ==== Argument Binding
410
+
411
+ Support for `@Argument` binding is provided by `GraphQlArgumentBinder`. This class is
412
+ responsible for creating and populating target object from GraphQL argument values.
413
+
414
+ Argument binding supports several customizations options:
415
+
416
+ - `nameResolver` -- customize the mapping of GraphQL argument names to Object properties,
417
+ which can be useful to deal with naming conventions like the use of "-".
418
+ - `fallBackOnDirectFieldAccess` -- falls back to direct field access in case the target
419
+ object does not use accessor methods.
420
+ - `conversionService` -- used for type conversion where needed.
421
+
422
+ To customize argument binding, use dedicated properties on `AnnotatedControllerConfigurer`
423
+ to set `GraphQlArgumentBinder.Options`.
424
+
425
+
426
+
407
427
[[controllers.schema-mapping.argument-value]]
408
428
=== `ArgumentValue`
409
429
0 commit comments