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.
Parameters
Section titled “Parameters”access?
Section titled “access?”AccessCallOptions<string>
Per-call access overrides.
The caller.
collection
Section titled “collection”string
The collection being read (the permission resource).
config?
Section titled “config?”The resolved VexConfig.
drafts?
Section titled “drafts?”boolean
The caller’s drafts arg.
Returns
Section titled “Returns”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
Section titled “access”access:
VexAccessConfig<Record<string,SubjectEntry>, readonlyAccessResource[],string,string|undefined,Partial<Record<string,CustomActionsInput>>> |undefined
action
Section titled “action”action:
string
resource
Section titled “resource”resource:
string
wantsDrafts
Section titled “wantsDrafts”wantsDrafts:
boolean