Sanity Library Reference Docs
    Preparing search index...

    Interface UseAllReleasesOptions

    Options for useAllReleases.

    interface UseAllReleasesOptions {
        dataset?: string;
        perspective?: ReleasePerspective | ClientPerspective$1;
        projectId?: string;
        resource?: DocumentResource;
        resourceName?: string;
        state?: ReleaseState | ReleaseState[];
    }

    Hierarchy

    Index

    Properties

    dataset?: string
    perspective?: ReleasePerspective | ClientPerspective$1
    projectId?: string
    resource?: DocumentResource

    Explicit resource to use. On an individual operation this overrides any default; on a SanityConfig it becomes the instance's default resource. Unlike projectId/dataset, this can also be a media library or canvas resource.

    resourceName?: string

    Optional name of a resource to resolve from context. If provided, will be resolved to a DocumentResource via ResourcesContext.

    Only return releases in this state, or in any of these states. Omit it to return every release.

    This matches the release document's state field exactly, so 'active' returns only releases whose state is 'active'. That is narrower than useActiveReleases, which also includes releases that are scheduled or mid-transition. An empty array matches no releases.

    Without state, the hook returns every release, archived and published ones included. The next major is planned to change that default to leave out archived releases, so pass state explicitly if you depend on seeing them.