Repository navigation
scoping.Interface.ScopeOptions
Defined in: packages/graphql-casl/src/scoping.ts:54
Options for scopeArgs.
TFilter
adapter: FilterAdapter<TFilter>;Defined in: packages/graphql-casl/src/scoping.ts:60
The dialect to fold the ability's rules into. Must produce whatever the target argument's input type actually accepts — see the coercion warning in this module's description.
optional into?: string;Defined in: packages/graphql-casl/src/scoping.ts:70
The argument to inject the filter into.
Default 'where'.
applyPermissions checks that the field really has an argument by this
name and refuses the map if it does not.
optional merge?: (clientFilter, scope) => unknown;Defined in: packages/graphql-casl/src/scoping.ts:82
How to combine the caller's own filter with the scope.
unknown
TFilter
unknown
The default is a top-level AND via the adapter —
adapter.and([clientFilter, scope]).
Override it only if the dialect needs a different combining shape. Do not
"merge" by spreading keys: a client filter of { OR: [...] } sits beside
the scope's keys rather than under it, and the scope stops applying.
optional onDenyAll?: OnDenyAll;Defined in: packages/graphql-casl/src/scoping.ts:92
What to do when the ability permits no row of this subject.
-
'deny'(default) — throwForbidden. Honest, and the only safe choice for a mutation: a forbidden delete must fail, not silently match nothing. -
'nothing'— injectadapter.nothing()so the field resolves to an empty result. Requires the adapter to supplynothing.