Sanity Library Reference Docs
    Preparing search index...
    StrictDefinedFetchType: <const QueryString extends string>(
        options: {
            params?: QueryParams | Promise<QueryParams>;
            perspective: LivePerspective;
            query: QueryString;
            requestTag?: string;
            stega: boolean;
            tags?: string[];
            variant?: string;
        },
    ) => Promise<
        {
            data: ClientReturn<QueryString, unknown>;
            sourceMap: ContentSourceMap | null;
            tags: string[];
        },
    >

    Like DefinedFetchType but with perspective and stega required. Returned by defineLive({strict: true}).

    Type declaration

      • <const QueryString extends string>(
            options: {
                params?: QueryParams | Promise<QueryParams>;
                perspective: LivePerspective;
                query: QueryString;
                requestTag?: string;
                stega: boolean;
                tags?: string[];
                variant?: string;
            },
        ): Promise<
            {
                data: ClientReturn<QueryString, unknown>;
                sourceMap: ContentSourceMap | null;
                tags: string[];
            },
        >
      • Type Parameters

        • const QueryString extends string

        Parameters

        • options: {
              params?: QueryParams | Promise<QueryParams>;
              perspective: LivePerspective;
              query: QueryString;
              requestTag?: string;
              stega: boolean;
              tags?: string[];
              variant?: string;
          }
          • Optionalparams?: QueryParams | Promise<QueryParams>
          • perspective: LivePerspective
          • query: QueryString
          • OptionalrequestTag?: string
          • stega: boolean
          • Optionaltags?: string[]
          • Optionalvariant?: string

            Editing variant used for the fetch, as the bare variant id (e.g. Ab12cd34).

            Stays optional in strict mode: the absence of a variant is a valid state (base content). With strict: true there is no cookie auto-resolution; only the explicit option is used.

        Returns Promise<
            {
                data: ClientReturn<QueryString, unknown>;
                sourceMap: ContentSourceMap | null;
                tags: string[];
            },
        >