Sanity Library Reference Docs
    Preparing search index...

    Type Alias InvalidationChannelEventBeta

    InvalidationChannelEvent:
        | { type: "connected" }
        | { documentId: string; type: "mutation"; visibility: string }

    Event emitted to notify preview subscribers when they need to refetch a document being previewed

    • 'connected' will happen when the store is connected to the invalidation channel, both initially and after a reconnect after a connection loss
    • 'mutation' will happen when a document has been mutated and the store needs to refetch a document