• Customize the default GraphQL errors to nicer ones

    Parameters

    • Optional errorDataMapper: MosaicErrorMapper

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

    • Optional isDev: boolean

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

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

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

      • (error, originalError?): {
            code?: string;
            extensions?: Dict<unknown>;
            message?: string;
        }
      • Parameters

        Returns {
            code?: string;
            extensions?: Dict<unknown>;
            message?: string;
        }

        • Optional code?: string
        • Optional extensions?: Dict<unknown>
        • Optional message?: string

Generated using TypeDoc