UNPKG

@omnigraph/raml

Version:

This package generates `GraphQLSchema` instance from **RAML API Document** (`.raml`) file located at a URL or FileSystem by resolving the JSON Schema dependencies. It uses `@omnigraph/json-schema` by generating the necessary configuration.

26 lines (25 loc) 1.61 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getSubgraphExecutor = exports.processDirectives = exports.getJSONSchemaOptionsFromRAMLOptions = exports.default = void 0; exports.loadRAMLSubgraph = loadRAMLSubgraph; const tslib_1 = require("tslib"); const loadGraphQLSchemaFromRAML_js_1 = require("./loadGraphQLSchemaFromRAML.js"); var loadGraphQLSchemaFromRAML_js_2 = require("./loadGraphQLSchemaFromRAML.js"); Object.defineProperty(exports, "default", { enumerable: true, get: function () { return loadGraphQLSchemaFromRAML_js_2.loadGraphQLSchemaFromRAML; } }); tslib_1.__exportStar(require("./loadGraphQLSchemaFromRAML.js"), exports); var getJSONSchemaOptionsFromRAMLOptions_js_1 = require("./getJSONSchemaOptionsFromRAMLOptions.js"); Object.defineProperty(exports, "getJSONSchemaOptionsFromRAMLOptions", { enumerable: true, get: function () { return getJSONSchemaOptionsFromRAMLOptions_js_1.getJSONSchemaOptionsFromRAMLOptions; } }); function loadRAMLSubgraph(name, options) { return (ctx) => ({ name, schema$: (0, loadGraphQLSchemaFromRAML_js_1.loadGraphQLSchemaFromRAML)(name, { ...options, fetch: ctx.fetch, cwd: ctx.cwd, logger: ctx.logger, }), }); } var json_schema_1 = require("@omnigraph/json-schema"); Object.defineProperty(exports, "processDirectives", { enumerable: true, get: function () { return json_schema_1.processDirectives; } }); Object.defineProperty(exports, "getSubgraphExecutor", { enumerable: true, get: function () { return json_schema_1.getSubgraphExecutor; } });