Sanity Library Reference Docs
    Preparing search index...
    • Explain one start GROQ requirement in the start-requirement context: no root (the subject rides $fields.<entry>.id — deploy rejects a root read), the StartScope bindings plus $definition and the caller's $fields map, and the scope's fetched slice as * when the predicate reads the dataset. Returns the full ConditionInsightoutcome is the verdict ('satisfied' allows; 'unsatisfied'/'unevaluable' refuse, fail-closed) and the atom breakdown is what lets a surface disable its start affordance AND say why. One evaluator serves both moments: startInstance enforces the outcome, the evaluateStart verb pre-flights it.

      A dataset-reading predicate with no slice provider THROWS instead of failing closed: unlike a picker that merely hides a row, this verdict refuses starts — evaluating over an empty * would let a count()-style rule pass vacuously, and a silent "not allowed" would misreport a caller bug as an author verdict. Parse/evaluation throws rethrow naming the definition, like the filter's; a failed slice FETCH propagates as itself.

      Parameters

      • args: {
            definition: Pick<ApplicabilitySource, "name" | "fields">;
            fields: Record<string, unknown>;
            query: string;
            scope?: StartScope;
        }
        • definition: Pick<ApplicabilitySource, "name" | "fields">
        • fields: Record<string, unknown>

          The caller's input entries as a $fields map — the engine verbs build it with startFieldsParam (field resolution's projection), so the predicate can only see values the resolution would persist.

        • query: string
        • Optionalscope?: StartScope

      Returns Promise<ConditionInsight>