postgraphile
Version:
A GraphQL schema created by reflection over a PostgreSQL schema 🐘 (previously known as PostGraphQL)
10 lines (9 loc) • 527 B
TypeScript
import { GraphQLError } from 'graphql';
import { GraphQLFormattedErrorExtended } from '../interfaces';
/**
* Given a GraphQLError, format it according to the rules described by the
* Response Format, Errors section of the GraphQL Specification, plus it can
* extract additional error codes from the postgres error, such as 'hint',
* 'detail', 'errcode', 'where', etc. - see `extendedErrors` option.
*/
export declare function extendedFormatError(error: GraphQLError, fields: Array<string>): GraphQLFormattedErrorExtended;