type
NonNullInput
type NonNullInput[T any] struct {
value T
}A write-only generated mutation value that refuses to encode JSON null.
MarshalJSON()([]byte, error)- Encode the concrete value, or fail when it encodes as JSON null.
Generated non-null slice, map, fallback json.RawMessage, and plugin-owned named mutation fields use this wrapper because the manifest does not fully describe their JSON nullability.
A required field uses a NonNullInput value constructed by NonNull. A defaulted or update field uses *NonNullInput: nil omits the key and SetNonNull supplies a present value.
NonNullInput intentionally implements marshaling only. Nil slices, nil maps, nil interfaces, and null json.RawMessage values fail encoding instead of weakening the schema contract.
Methods
NonNullInput.MarshalJSON()MarshalJSON implements json.Marshaler and rejects an encoded JSON null.