UNPKG

613 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3var graphql_1 = require("graphql");
4function 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}
19exports.parse = parse;
20//# sourceMappingURL=parse.js.map
\No newline at end of file