Skip to content

Commit

Permalink
fix(types): handleErrors option type (#1542)
Browse files Browse the repository at this point in the history
  • Loading branch information
pinn3 authored Oct 20, 2021
1 parent c4eb076 commit 3a19293
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ export interface PostGraphileOptions<
errors: ReadonlyArray<GraphQLError>,
req: Request,
res: Response,
) => Array<GraphQLErrorExtended>;
) => ReadonlyArray<GraphQLError | GraphQLErrorExtended>;
// An array of [Graphile Engine](/graphile-build/plugins/) schema plugins to load
// after the default plugins.
appendPlugins?: Array<Plugin>;
Expand Down Expand Up @@ -341,8 +341,8 @@ export interface GraphQLFormattedErrorExtended {
export type GraphQLErrorExtended = GraphQLError & {
extensions: {
exception: {
hint: string;
detail: string;
hint?: string;
detail?: string;
code: string;
};
};
Expand Down Expand Up @@ -371,7 +371,7 @@ export interface HttpRequestHandler<
errors: ReadonlyArray<GraphQLError>,
req: Request,
res: Response,
) => Array<GraphQLErrorExtended>;
) => ReadonlyArray<GraphQLError | GraphQLErrorExtended>;
graphqlRoute: string;
graphqlRouteHandler: (res: PostGraphileResponse) => Promise<void>;
graphiqlRoute: string;
Expand Down

0 comments on commit 3a19293

Please sign in to comment.