#[non_exhaustive]pub struct MutationResponse {Show 13 fields
pub succeeded: bool,
pub state_changed: bool,
pub error_class: Option<MutationErrorClass>,
pub status_detail: Option<String>,
pub http_status: Option<i16>,
pub message: Option<String>,
pub entity_id: Option<Uuid>,
pub entity_type: Option<String>,
pub entity: Value,
pub updated_fields: Vec<String>,
pub cascade: Value,
pub error_detail: Value,
pub metadata: Value,
}Expand description
Typed app.mutation_response row.
Field types map 1:1 to the PostgreSQL composite columns. See
docs/architecture/mutation-response.md.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.succeeded: boolTerminal outcome. true means the operation completed (including noops).
state_changed: boolDid the database actually change? Independent of succeeded.
error_class: Option<MutationErrorClass>NULL iff succeeded. Drives the cascade error code 1:1.
status_detail: Option<String>Human-readable subtype (e.g. "duplicate_email"); not parsed.
http_status: Option<i16>HTTP status, first-class. Validated to 100..=599 on ingest.
message: Option<String>Human-readable summary safe to show to end users.
entity_id: Option<Uuid>Primary key of the affected entity. Present for updates/deletes.
entity_type: Option<String>GraphQL type name (e.g. "User"). Used for cache invalidation.
entity: ValueFull entity payload. Populated even for noops.
updated_fields: Vec<String>GraphQL field names that changed. Empty on noop.
cascade: ValueCascade operations (see the graphql-cascade specification).
error_detail: ValueStructured error payload only (field / constraint / severity).
metadata: ValueObservability only (trace IDs, timings, audit extras).
Trait Implementations§
Source§impl Clone for MutationResponse
impl Clone for MutationResponse
Source§fn clone(&self) -> MutationResponse
fn clone(&self) -> MutationResponse
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for MutationResponse
impl Debug for MutationResponse
Source§impl<'de> Deserialize<'de> for MutationResponse
impl<'de> Deserialize<'de> for MutationResponse
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for MutationResponse
impl RefUnwindSafe for MutationResponse
impl Send for MutationResponse
impl Sync for MutationResponse
impl Unpin for MutationResponse
impl UnsafeUnpin for MutationResponse
impl UnwindSafe for MutationResponse
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more