@graphql-mesh/transport-rest
Version:
23 lines (22 loc) • 1.25 kB
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.processScalarType = exports.processDirectives = exports.getSubgraphExecutor = void 0;
const transport_common_1 = require("@graphql-mesh/transport-common");
const process_js_1 = require("./directives/process.js");
const getSubgraphExecutor = function getRESTSubgraphExecutor({ transportEntry, getSubgraph, fetch, pubsub, logger }) {
const preProcessedSchema = getSubgraph();
const processDirectiveOpts = {
globalFetch: fetch,
pubsub,
logger,
...transportEntry.options,
};
const processedSchema = (0, process_js_1.processDirectives)(preProcessedSchema, processDirectiveOpts);
const executor = (0, transport_common_1.createDefaultExecutor)(processedSchema);
return executor;
};
exports.getSubgraphExecutor = getSubgraphExecutor;
var process_js_2 = require("./directives/process.js");
Object.defineProperty(exports, "processDirectives", { enumerable: true, get: function () { return process_js_2.processDirectives; } });
var scalars_js_1 = require("./directives/scalars.js");
Object.defineProperty(exports, "processScalarType", { enumerable: true, get: function () { return scalars_js_1.processScalarType; } });
;