You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The callable middleware form used in PermissionsMap entries.
Parameters
resolve
ResolveFn
parent
unknown
args
unknown
context
any
info
GraphQLResolveInfo
Returns
Promise<any>
Remarks
A rule receives the wrapped resolve function plus the standard resolver
arguments. It either calls resolve(...) to allow the field, or throws to
deny it. createCan produces rules that enforce CASL abilities;
accept and deny are the always-pass / always-fail primitives.
The declared return type is a promise, and a denial is always delivered as a
rejection. An allowed field, though, may hand back whatever resolve
returned — a plain value when the resolver is synchronous — exactly as a
GraphQL resolver may. Callers await the result, which handles both.