npm.io
2.1.7 • Published 2 years ago

@types/graphql-errors

Licence
MIT
Version
2.1.7
Deps
1
Size
3 kB
Vulns
0
Weekly
0
Stars
51.4K

Installation

npm install --save @types/graphql-errors

Summary

This package contains type definitions for graphql-errors (https://github.com/kadirahq/graphql-errors).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/graphql-errors.

index.d.ts

import { GraphQLSchema } from "graphql";

export type HandlerFunction = (err: Error) => Error;

export function setDefaultHandler(fn: HandlerFunction): void;

export function maskErrors(schema: GraphQLSchema, fn?: HandlerFunction): void;

export class UserError extends Error {
    constructor(message: string);
}

Additional Details

  • Last updated: Tue, 07 Nov 2023 0337 GMT
  • Dependencies: graphql

Credits

These definitions were written by Matías Olivera.