Sanity Library Reference Docs
    Preparing search index...
    • The @sanity/client-config fragment that addresses a WorkflowResource — the one home for the dataset-vs-resource branch every client-building host (CLI, MCP) would otherwise reimplement. A dataset addresses via the classic {projectId, dataset} config (the proven path, and it keeps client.listen() on well-trodden ground); the other resource types have no projectId/dataset split, so they pass through as a resource directly.

      Returns a plain fragment (not a client) so the engine stays free of a runtime @sanity/client dependency — callers spread it into their own createClient call alongside their auth/host params.

      Parameters

      Returns { dataset: string; projectId: string } | { resource: WorkflowResource }