UNPKG

365 BJavaScriptView Raw
1import { GraphQLError } from './GraphQLError';
2/**
3 * Produces a GraphQLError representing a syntax error, containing useful
4 * descriptive information about the syntax error's position in the source.
5 */
6
7export function syntaxError(source, position, description) {
8 return new GraphQLError("Syntax Error: ".concat(description), undefined, source, [position]);
9}