Sanity Library Reference Docs
    Preparing search index...

    Interface DefineSanityLiveOptions

    interface DefineSanityLiveOptions {
        browserToken?: string | false;
        client: SanityClient;
        fetchOptions?: { revalidate?: number | false };
        serverToken?: string | false;
        stega?: boolean;
    }
    Index

    Properties

    browserToken?: string | false

    Optional. This token is shared with the browser, and should only have access to query published documents. It is used to setup a Live Draft Content EventSource connection, and enables live previewing drafts stand-alone, outside of Presentation Tool.

    client: SanityClient

    Required for sanityFetch and SanityLive to work

    fetchOptions?: { revalidate?: number | false }

    Fetch options used by sanityFetch

    Type declaration

    • Optionalrevalidate?: number | false

      Optional, enables time based revalidation in addition to the EventSource connection.

      false

    serverToken?: string | false

    Optional. If provided then the token needs to have permissions to query documents with drafts. prefixes in order for perspective: 'drafts' to work. This token is not shared with the browser.

    stega?: boolean

    Optional. Include stega encoding when draft mode is enabled.

    true