Skip to content

index.TypeAlias.FallbackError

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

Type Alias: FallbackError

type FallbackError = 
  | Error
  | string
  | ((original, parent, args, context, info) => Error | Promise<Error>);

Defined in: packages/graphql-casl/src/errorControl.ts:34

A replacement error for denials that did not name one: an Error, a message, or a mapper that receives the original error and the resolver arguments.

Remarks

The mapper is the form that lets a denial become a GraphQLError with a code and extensions, or vary by field.

API Reference

Clone this wiki locally