UNPKG

graphql-codegen-core

Version:

GraphQL types and code generator based on schema

20 lines 613 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var graphql_1 = require("graphql"); function parse(source) { try { return graphql_1.parse(source); } catch (e) { var error = void 0; if (typeof source === 'string') { error = new Error("Parsing '" + source.trim().substr(0, 25) + "...' failed with: " + e.message); } else { error = new Error("Parsing a document in '" + source.name + "' failed with: " + e.message); } throw error; } } exports.parse = parse; //# sourceMappingURL=parse.js.map