Sanity Library Reference Docs
    Preparing search index...
    • Drive a workflow instance reactively from Sanity Studio. Every document and query observes through the App SDK store, including the mounted workspace and the engine's state dataset. An SDK instance is bootstrapped automatically in Studio mode, following Studio's token or cookie authentication reactively (pass sdk to supply your own). Returns the full WorkflowSession (evaluation, ready, guards, and the tick/fireAction/editField/preview verbs); the consumer decides when to advance. Must render inside Studio source context.

      Parameters

      • __namedParameters: {
            engine: Engine;
            grantsFromPath?: string;
            guardScope?: readonly string[];
            instanceId: string;
            sdk?: SanityInstance;
        }
        • engine: Engine
        • OptionalgrantsFromPath?: string
        • OptionalguardScope?: readonly string[]

          The id-set of every co-mounted session, handed identically to each one so guard observation consolidates into one shared live query per resource. Must include instanceId. Omitted, guards are observed per instance.

        • instanceId: string
        • Optionalsdk?: SanityInstance

      Returns WorkflowSession