Mirror: The small sibling of the graphql package, slimmed down for client-side libraries.
1export { GraphQLError } from '@0no-co/graphql.web';
2
3/**
4 * Prints a GraphQLError to a string, representing useful location information
5 * about the error's position in the source.
6 *
7 * @deprecated Please use `error.toString` instead. Will be removed in v17
8 */
9export function printError(error) {
10 return error.toString();
11}
12
13/**
14 * Given a GraphQLError, format it according to the rules described by the
15 * Response Format, Errors section of the GraphQL Specification.
16 *
17 * @deprecated Please use `error.toString` instead. Will be removed in v17
18 */
19export function formatError(error) {
20 return error.toJSON();
21}