Sanity Library Reference Docs
    Preparing search index...

    Interface SanityFetchOptions<QueryString>Alpha

    CAUTION: This API does not follow semver and could have breaking changes in future minor releases.

    interface SanityFetchOptions<QueryString extends string> {
        params?: QueryParams;
        perspective?:
            | "previewDrafts"
            | "published"
            | "drafts"
            | StackablePerspective[];
        query: QueryString;
        requestTag?: string;
        stega?: boolean;
        tags?: string[];
    }

    Type Parameters

    • QueryString extends string
    Index

    Properties

    params?: QueryParams
    perspective?: "previewDrafts" | "published" | "drafts" | StackablePerspective[]
    'published'
    
    requestTag?: string

    This request tag is used to identify the request when viewing request logs from your Sanity Content Lake.

    'next-loader.fetch'
    
    stega?: boolean

    Enables stega encoding of the data, this is typically only used in draft mode in conjunction with perspective: 'drafts' and with @sanity/visual-editing setup.

    false

    tags?: string[]

    Custom cache tags that can be used with next's revalidateTag and updateTag functions for custom webhook on-demand revalidation.