You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: generator/graphql-kotlin-schema-generator/src/test/kotlin/com/expediagroup/graphql/generator/execution/FunctionDataFetcherTest.kt
+38-1Lines changed: 38 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -76,8 +76,15 @@ class FunctionDataFetcherTest {
76
76
isOptionalInput.Undefined->"input was UNDEFINED"
77
77
isOptionalInput.Defined->"first input was ${input.value?.first()?.field1}"
Copy file name to clipboardExpand all lines: website/docs/schema-generator/execution/optional-undefined-arguments.md
+3-2Lines changed: 3 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -16,10 +16,11 @@ value and explicit `null` value.
16
16
17
17
`OptionalInput` is a convenient sealed class wrapper that provides distinction between undefined, null, and non-null
18
18
values. If the argument is not specified in the request it will be represented as a `OptionalInput.Undefined` object, otherwise the
19
-
value will be wrapped in `OptionalInput.Defined` class.
19
+
value will be wrapped in `OptionalInput.Defined` class. As a best practice, we highly recommend to set appropriate
20
+
[default values to all optional arguments](https://opensource.expediagroup.com/graphql-kotlin/docs/schema-generator/writing-schemas/arguments#default-values).
0 commit comments