Sanity Library Reference Docs
    Preparing search index...

    The reactive subscription target for an instance: the exploded, deduped watch-set plus the instance's read WorkflowPerspective.

    interface WatchSet {
        documents: SubscriptionDocument[];
        perspective?: WorkflowPerspective;
    }
    Index

    Properties

    Docs to subscribe to — instance + ancestors + the docs named by doc.ref/subject/doc.refs/release.ref field entries — deduped by globalDocumentId. Refs that aren't resource-qualified GDR URIs are skipped (without a resource there's nothing to subscribe against).

    perspective?: WorkflowPerspective

    The instance's effective read perspective (a release stack like [releaseName] or [releaseName, "drafts"]), already resolved at startInstance. undefined means content reads use the drafts-preferring DEFAULT_CONTENT_PERSPECTIVE.

    The engine does not form versions.<release>.<id> ids — it has no such concept (it reads content through client.fetch({perspective}) for queries). A reactive consumer applies this perspective when it subscribes: a content doc resolves under the release contentReleaseName names (e.g. Studio editState's version param, or the SDK's getVersionId), falling back to the draft only when contentDraftFallback allows it, then published — while instance / ancestor / system.release docs are always raw. The type on each SubscriptionDocument tells the consumer which is which.