Skip to main content

getGuardAbortReason()

getGuardAbortReason(query: RuleGroupTypeAny, pathOrID: string | Path | undefined, guards?: GuardOptions, __namedParameters?: { asParent?: boolean; }): AbortReason | null

Defined in: packages/core/src/utils/queryTools.ts:157

Whether a mutation targeting pathOrID is blocked by the given guards, and why. Returns null when the mutation may proceed.

Exported so that callers which run their own logic before mutating—such as a UI layer that invokes a confirmation callback—can apply the same rules without duplicating them.

Parameters

ParameterType
queryRuleGroupTypeAny
pathOrIDstring | Path | undefined
guardsGuardOptions
__namedParameters{ asParent?: boolean; }
__namedParameters.asParent?boolean

Returns

AbortReason | null


caution

API documentation is generated from the latest commit on the main branch. It may be somewhat inconsistent with official releases of React Query Builder.