mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-06-28 14:20:12 +00:00
[graphql-errors] Change type case to StudlyCase
This commit is contained in:
@@ -2,7 +2,7 @@ import { GraphQLSchema, buildSchema } from 'graphql';
|
||||
import {
|
||||
UserError,
|
||||
maskErrors,
|
||||
handlerFunction,
|
||||
HandlerFunction,
|
||||
setDefaultHandler
|
||||
} from 'graphql-errors';
|
||||
|
||||
@@ -11,7 +11,7 @@ const schema: GraphQLSchema = buildSchema(`
|
||||
# graphql schema definition
|
||||
`);
|
||||
|
||||
const customHandler: handlerFunction = err => {
|
||||
const customHandler: HandlerFunction = err => {
|
||||
return { ...err, message: 'Internal error' };
|
||||
};
|
||||
|
||||
|
||||
6
types/graphql-errors/index.d.ts
vendored
6
types/graphql-errors/index.d.ts
vendored
@@ -6,11 +6,11 @@
|
||||
|
||||
import { GraphQLSchema } from 'graphql';
|
||||
|
||||
export type handlerFunction = (err: Error) => Error;
|
||||
export type HandlerFunction = (err: Error) => Error;
|
||||
|
||||
export function setDefaultHandler(fn: handlerFunction): void;
|
||||
export function setDefaultHandler(fn: HandlerFunction): void;
|
||||
|
||||
export function maskErrors(schema: GraphQLSchema, fn?: handlerFunction): void;
|
||||
export function maskErrors(schema: GraphQLSchema, fn?: HandlerFunction): void;
|
||||
|
||||
export class UserError extends Error {
|
||||
constructor(message: string);
|
||||
|
||||
Reference in New Issue
Block a user