Skip to content

resolveReadCall

resolveReadCall(props): object

Defined in: packages/core/src/access/resolveReadCall.ts:29

Resolves a collection READ call (find/get/search) that may ask for drafts, applying the draft fallback every read shares.

drafts: true only takes effect for a caller who may read drafts at all (readDrafts at any scope — per-document draft rules still run in each read’s own per-row check). Anyone else silently gets the published-only read, resolved under read, rather than an error or an empty result — the same fallback getGlobal uses. That is what lets the admin views and NextAdminPage’s prefetches always send drafts: true for a versioned collection without knowing who is asking.

AccessCallOptions<string>

Per-call access overrides.

VexApiAuth

The caller.

string

The collection being read (the permission resource).

VexConfig

The resolved VexConfig.

boolean

The caller’s drafts arg.

object

resolveAccessCall’s result for the action that applies, plus wantsDrafts — the EFFECTIVE drafts flag every downstream step must use instead of the raw drafts arg.

access: VexAccessConfig<Record<string, SubjectEntry>, readonly AccessResource[], string, string | undefined, Partial<Record<string, CustomActionsInput>>> | undefined

action: string

resource: string

wantsDrafts: boolean