Axinom Mosaic Libraries
    Preparing search index...
    • Customize the default GraphQL errors to nicer ones

      Parameters

      • OptionalerrorDataMapper: MosaicErrorMapper

        A mosaic error mapper that maps known error types to user friendly ones.

      • OptionalisDev: boolean

        innerError will be included inside of the extensions if this is true. False by default.

      Returns (
          error: GraphQLError,
          originalError?: Error | null,
      ) => { code?: string; extensions?: Dict<unknown>; message?: string }

      A function that can be used in the GraphQL error handler for nice error messages