OptionalVariable
A variable of an operation that may be left undefined, which is distinct from null: an Undefined variable is not sent to the server at all (and takes the operation's default), a Value is sent even when it holds null.
Inheritors
Types
Link copied to clipboard
Serializes a Value with elementSerializer and an Undefined as nothing at all, so that the field is absent from the encoded variables. Only encoders that tolerate an element encoding nothing support this (the tree encoder of kotlinx-serialization-json does, its streaming encoder does not). Decoding is not supported, as variables are only ever sent.
Link copied to clipboard
The undefined variable: omitted when the variables are serialized.