Sanity App SDK
    Preparing search index...

    Interface PaginatedDocumentsOptions<TDocumentType, TDataset, TProjectId>

    Configuration options for the usePaginatedDocuments hook

    interface PaginatedDocumentsOptions<
        TDocumentType extends string = string,
        TDataset extends string = string,
        TProjectId extends string = string,
    > {
        cache?: undefined;
        cacheMode?: "noStale";
        dataset?: TDataset;
        documentType?: TDocumentType | TDocumentType[];
        filter?: string;
        next?: undefined;
        orderings?: SortOrderingItem[];
        pageSize?: number;
        params?: Record<string, unknown>;
        perspective?: ReleasePerspective | ClientPerspective;
        projectId?: TProjectId;
        search?: string;
        tag?: string;
        useCdn?: boolean;
    }

    Type Parameters

    • TDocumentType extends string = string
    • TDataset extends string = string
    • TProjectId extends string = string

    Hierarchy

    Index

    Properties

    cache?: undefined
    cacheMode?: "noStale"

    When set to noStale, APICDN will not return a cached response if the content is stale. Tradeoff between latency and freshness of content.

    Only to be used with live content queries and when useCdn is true.

    dataset?: TDataset
    documentType?: TDocumentType | TDocumentType[]
    filter?: string

    GROQ filter expression to apply to the query

    next?: undefined
    orderings?: SortOrderingItem[]

    Sorting configuration for the results

    pageSize?: number

    Number of items to display per page (defaults to 25)

    params?: Record<string, unknown>
    perspective?: ReleasePerspective | ClientPerspective
    projectId?: TProjectId
    search?: string

    Text search query to filter results

    tag?: string
    useCdn?: boolean