Expand description
Three-state wrapper for nullable input fields.
GraphQL distinguishes between an omitted field (“don’t change this”) and an
explicit null (“clear this field”). Option<T> + skip_serializing_if
can only express the first. MaybeUndefined<T> carries both, so
generated input types can drive the Linear API faithfully without hand-rolled
JSON patches on the consumer side.
Codegen emits nullable input fields as:
ⓘ
#[serde(default, skip_serializing_if = "MaybeUndefined::is_undefined")]
pub lead_id: MaybeUndefined<String>,Consumers choose one of:
| Intent | Value | Wire form |
|---|---|---|
| Leave unchanged | MaybeUndefined::Undefined | field omitted |
| Clear on the server | MaybeUndefined::Null | "field": null |
| Set to a value | MaybeUndefined::Value(v) | "field": v |
Enums§
- Maybe
Undefined - A three-state field value: undefined (omitted), null (explicit clear), or a concrete value.