1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | var graphql_codegen_core_1 = require("graphql-codegen-core");
|
4 | var graphql_tag_pluck_1 = require("graphql-tag-pluck");
|
5 | exports.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 |
|
\ | No newline at end of file |