[graphql-errors] Change type case to StudlyCase

This commit is contained in:
Matías Olivera
2018-12-18 13:33:45 -03:00
parent db9106038c
commit d3be2c81fa
2 changed files with 5 additions and 5 deletions

View File

@@ -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' };
};

View File

@@ -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);