UNPKG

graphqldoc

Version:
15 lines (14 loc) 511 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const introspectionParser_1 = require("./introspectionParser"); const path_1 = require("path"); exports.jsonSchemaLoader = function (options) { try { const schemaPath = path_1.resolve(options.schemaFile); const introspection = require(schemaPath); return Promise.resolve(introspectionParser_1.getSchemaFromIntrospection(introspection)); } catch (err) { return Promise.reject(err); } };