evaluateQueryConstraint
evaluateQueryConstraint(
props):QueryConstraintOutcome
Defined in: packages/core/src/access/evaluateQueryConstraint.ts:114
Runs a constrained rule’s withIndex and where for one caller and assembles
the result.
Parameters
Section titled “Parameters”Input props.
callerProps
Section titled “callerProps”Record<string, unknown>
{ user } plus { organization } when configured. Pass the
user-read sentinel’s proxy here, as the callers do today, so a rule keyed to an
absent caller is detected.
{ where?: unknown; withIndex?: unknown; }
The rule object; at least one of withIndex / where is present.
withIndex is the static { name, range } or a callback returning one or a boolean;
where is a plain where node, or a callback returning a predicate or a boolean. filter
is ignored here — it is per-document, and hasPermission runs it.
check.where?
Section titled “check.where?”unknown
check.withIndex?
Section titled “check.withIndex?”unknown
Returns
Section titled “Returns”The rule’s outcome for this caller.
Throws
Section titled “Throws”Whatever a callback throws — validateAccessConfig wraps it in a
VexAccessConfigError naming the rule.