UNPKG

561 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3var graphql_codegen_core_1 = require("graphql-codegen-core");
4var graphql_tag_pluck_1 = require("graphql-tag-pluck");
5exports.extractDocumentStringFromCodeFile = function (fileContent) {
6 try {
7 var parsed = graphql_codegen_core_1.parse(fileContent);
8 if (parsed) {
9 return fileContent;
10 }
11 }
12 catch (e) {
13 return graphql_tag_pluck_1.default.fromCodeString.sync(fileContent) || null;
14 }
15};
16//# sourceMappingURL=document-finder.js.map
\No newline at end of file