The ID of the document that was affected
OptionaleffectsThe effects of the mutation, if the listener was configured with effectFormat: 'mendoza'.
Object with apply and revert arrays, see https://github.com/sanity-io/mendoza.
A unique ID for this event
The user ID of the user that performed the mutation
An array of mutations that were performed. Note that this can differ slightly from the mutations sent to the server, as the server may perform some mutations automatically.
OptionalpreviousThe document as it looked before the mutation was performed. This is only included if
the listener was configured with includePreviousRevision: true.
OptionalpreviousThe revision ID of the document before the mutation was performed
OptionalresultThe document as it looked after the mutation was performed. This is only included if
the listener was configured with includeResult: true.
OptionalresultThe revision ID of the document after the mutation was performed
A timestamp for when the mutation was performed
The index of this event within the transaction. Note that events may be delivered out of order, and that the index is zero-based.
The transaction ID for the mutation
The total number of events that will be sent for this transaction. Note that this may differ from the amount of documents affected by the transaction, as this number only includes the documents that matches the given filter.
This can be useful if you need to perform changes to all matched documents atomically,
eg you would wait for transactionTotalEvents events with the same transactionId before
applying the changes locally.
The type of transition the document went through.
update means the document was previously part of the subscribed set of documents,
and still is.appear means the document was not previously part of the subscribed set of documents,
but is now. This can happen both on create or if updating to a state where it now matches
the filter provided to the listener.disappear means the document was previously part of the subscribed set of documents,
but is no longer. This can happen both on delete or if updating to a state where it no
longer matches the filter provided to the listener.Whether the change that triggered this event is visible to queries (query) or only to
subsequent transactions (transaction). The listener client can specify a preferred visibility
through the visibility parameter on the listener, but this is only on a best-effort basis,
and may yet not be accurate.
A mutation was performed. Note that when updating multiple documents in a transaction, each document affected will get a separate mutation event.