From d3be2c81faa2d828d9716dedff22a7008d480886 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C3=ADas=20Olivera?= Date: Tue, 18 Dec 2018 13:33:45 -0300 Subject: [PATCH] [graphql-errors] Change type case to StudlyCase --- types/graphql-errors/graphql-errors-tests.ts | 4 ++-- types/graphql-errors/index.d.ts | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/types/graphql-errors/graphql-errors-tests.ts b/types/graphql-errors/graphql-errors-tests.ts index 0820fe2afa..d9d07b2071 100644 --- a/types/graphql-errors/graphql-errors-tests.ts +++ b/types/graphql-errors/graphql-errors-tests.ts @@ -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' }; }; diff --git a/types/graphql-errors/index.d.ts b/types/graphql-errors/index.d.ts index 5dc452ab20..d179cf3d7e 100644 --- a/types/graphql-errors/index.d.ts +++ b/types/graphql-errors/index.d.ts @@ -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);