1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | var graphql_1 = require("graphql");
|
4 | function parse(source) {
|
5 | try {
|
6 | return graphql_1.parse(source);
|
7 | }
|
8 | catch (e) {
|
9 | var error = void 0;
|
10 | if (typeof source === 'string') {
|
11 | error = new Error("Parsing '" + source.trim().substr(0, 25) + "...' failed with: " + e.message);
|
12 | }
|
13 | else {
|
14 | error = new Error("Parsing a document in '" + source.name + "' failed with: " + e.message);
|
15 | }
|
16 | throw error;
|
17 | }
|
18 | }
|
19 | exports.parse = parse;
|
20 |
|
\ | No newline at end of file |