UNPKG

@graphql-mesh/transport-rest

Version:
18 lines (17 loc) 695 B
import { createDefaultExecutor } from '@graphql-mesh/transport-common'; import { processDirectives } from './directives/process.js'; export default { getSubgraphExecutor({ transportEntry, subgraph, fetch, pubsub, logger }) { const processDirectiveOpts = { globalFetch: fetch, pubsub, logger, ...transportEntry.options, }; const processedSchema = processDirectives(subgraph, processDirectiveOpts); const executor = createDefaultExecutor(processedSchema); return executor; }, }; export { processDirectives } from './directives/process.js'; export { processScalarType } from './directives/scalars.js';