UNPKG

672 BJavaScriptView Raw
1'use strict';
2
3Object.defineProperty(exports, "__esModule", {
4 value: true
5});
6exports.syntaxError = syntaxError;
7
8var _GraphQLError = require('./GraphQLError');
9
10/**
11 * Produces a GraphQLError representing a syntax error, containing useful
12 * descriptive information about the syntax error's position in the source.
13 */
14/**
15 * Copyright (c) 2015-present, Facebook, Inc.
16 *
17 * This source code is licensed under the MIT license found in the
18 * LICENSE file in the root directory of this source tree.
19 *
20 *
21 */
22
23function syntaxError(source, position, description) {
24 return new _GraphQLError.GraphQLError('Syntax Error: ' + description, undefined, source, [position]);
25}
\No newline at end of file