Sanity Library Reference Docs
    Preparing search index...
    interface BenchEvaluateArgs {
        access?: WorkflowAccess;
        actor?: Actor;
        attributes?: UserAttributes;
        grants?: Grant[];
        grantsFromPath?: string;
        instanceId: string;
    }
    Index

    Properties

    Replaces the bench's access for this call. When supplied, individual access shortcuts are ignored.

    actor?: Actor

    Actor for this call. Omit to use the bench's actor. Changing only the actor retains the bench's default grants and attributes.

    attributes?: UserAttributes

    Attributes for this call. Omit to retain the bench's defaults; pass {} to clear them.

    grants?: Grant[]

    Grants for this call. Omit to retain the bench's default grants; pass [] to grant nothing.

    grantsFromPath?: string

    URL path on the supplied client where the engine should fetch grants. The actor always token-resolves from the supplied client; without a grants path the rendered $can is undefined, so conditions referencing it fail closed — and the real Sanity write boundary still enforces.

    Canvas resource example: /canvases/<resourceId>/acl. Project/dataset example: /projects/<id>/datasets/<dataset>/acl.

    Result is cached per (client, path) for the lifetime of the process — grants don't change often, and tearing them down per call would mean a network round-trip on every fireAction.

    instanceId: string