Skip to content

requiresPublishedOnly

requiresPublishedOnly(props): boolean

Defined in: packages/core/src/versions/statusQueryConstraint.ts:27

Decides whether a query against collection must be narrowed to published-only rows.

Purely a data-integrity question — see composeStatusQueryConstraint for why the narrowing it drives runs independently of access.bypass. false for a non-versioned collection (nothing to narrow), for a caller explicitly requesting drafts, or when config wasn’t supplied.

Input props.

string

The collection slug being queried.

VexConfig

The resolved VexConfig, to look up collection’s versions.

boolean

The caller’s drafts arg (FindServerArgs.drafts / GetServerArgs.drafts / SearchServerArgs.drafts — one contract, shared).

boolean

true when the published-only constraint must apply.