Skip to content

index.Interface.LeafAdapter

github-actions[bot] edited this page Nov 30, 2026 · 26 revisions

Interface: LeafAdapter<TFilter>

Defined in: packages/graphql-casl/src/conditions.ts:117

A dialect that controls the leaves as well as the skeleton.

Remarks

Each comparison in a rule's conditions is delivered as one LeafCondition; the walker handles dotted paths, multi-operator objects, and the $and/$or/$nor groups that rehydrated database rules can contain.

Extends

Type Parameters

TFilter

TFilter

Properties

rule?

optional rule?: undefined;

Defined in: packages/graphql-casl/src/conditions.ts:122

Methods

and()

and(filters): TFilter;

Defined in: packages/graphql-casl/src/conditions.ts:78

All of these must hold.

Parameters

filters

TFilter[]

Returns

TFilter

Inherited from

AdapterCore.and


everything()

everything(): TFilter;

Defined in: packages/graphql-casl/src/conditions.ts:82

The filter that matches every row — no restriction at all.

Returns

TFilter

Inherited from

AdapterCore.everything


leaf()

leaf(condition): TFilter;

Defined in: packages/graphql-casl/src/conditions.ts:119

One comparison as a filter.

Parameters

condition

LeafCondition

Returns

TFilter


not()

not(filter): TFilter;

Defined in: packages/graphql-casl/src/conditions.ts:121

Negation — used for cannot rules and for $nor.

Parameters

filter

TFilter

Returns

TFilter


nothing()?

optional nothing(): TFilter;

Defined in: packages/graphql-casl/src/conditions.ts:87

The filter that matches no row. Optional, and only used by argument scoping's onDenyAll: 'nothing'.

Returns

TFilter

Inherited from

AdapterCore.nothing


or()

or(filters): TFilter;

Defined in: packages/graphql-casl/src/conditions.ts:80

Any of these may hold.

Parameters

filters

TFilter[]

Returns

TFilter

Inherited from

AdapterCore.or

API Reference

Clone this wiki locally