@@ -143,11 +143,11 @@ See xref:controllers.adoc#controllers.schema-mapping.argument[`@Argument`].
143143
144144See xref:controllers.adoc#controllers.schema-mapping.argument[`@Argument`].
145145
146- | `FieldValue `
146+ | `ArgumentValue `
147147| For access to a named field argument bound to a higher-level, typed Object along
148148with a flag to indicate if the input argument was omitted vs set to `null`.
149149
150- See xref:controllers.adoc#controllers.schema-mapping.field -value[`FieldValue `].
150+ See xref:controllers.adoc#controllers.schema-mapping.argument -value[`ArgumentValue `].
151151
152152| `@Arguments`
153153| For access to all field arguments bound to a higher-level, typed Object.
@@ -403,8 +403,8 @@ specified in the annotation, or to the parameter name. For access to the full ar
403403map, please use xref:controllers.adoc#controllers.schema-mapping.arguments[`@Arguments`] instead.
404404
405405
406- [[controllers.schema-mapping.fieldvalue ]]
407- === `FieldValue `
406+ [[controllers.schema-mapping.argument-value ]]
407+ === `ArgumentValue `
408408
409409By default, input arguments in GraphQL are nullable and optional, which means an argument
410410can be set to the `null` literal, or not provided at all. This distinction is useful for
@@ -414,7 +414,7 @@ there is no way to make such a distinction, because you would get `null` or an e
414414`Optional` in both cases.
415415
416416If you want to know not whether a value was not provided at all, you can declare an
417- `FieldValue ` method parameter, which is a simple container for the resulting value,
417+ `ArgumentValue ` method parameter, which is a simple container for the resulting value,
418418along with a flag to indicate whether the input argument was omitted altogether. You
419419can use this instead of `@Argument`, in which case the argument name is determined from
420420the method parameter name, or together with `@Argument` to specify the argument name.
@@ -426,31 +426,20 @@ For example:
426426 @Controller
427427 public class BookController {
428428
429- @QueryMapping
430- public List<Book> searchBook(@Argument String search, FieldValue<Genre> genre) {
431- if (!genre.isOmitted()) {
432- // genre has been set but might hold a "null" value
433- Genre genreValue = genre.value();
434- }
435- }
436-
437429 @MutationMapping
438- public void addBook(@Argument BookInput bookInput) {
439- FieldValue<String> genre = bookInput.genre();
440- genre.ifPresent(genre -> {
441- // ...
442- });
430+ public void addBook(ArgumentValue< BookInput> bookInput) {
431+ if (! bookInput.isOmitted()) {
432+ BookInput value = bookInput.value();
433+ // ...
434+ }
443435 }
444436 }
445437----
446438
447- `FieldValue ` is also supported as a field within the object structure of an `@Argument`
439+ `ArgumentValue ` is also supported as a field within the object structure of an `@Argument`
448440method parameter, either initialized via a constructor argument or via a setter, including
449441as a field of an object nested at any level below the top level object.
450442
451- This is also supported on the client side with a dedicated Jackson Module,
452- see the xref:client.adoc#client.fieldvalue[`FieldValue` support for clients] section.
453-
454443
455444[[controllers.schema-mapping.arguments]]
456445=== `@Arguments`
0 commit comments