@graphql-mesh/transport-rest
Version:
19 lines (18 loc) • 724 B
JavaScript
import { createDefaultExecutor } from '@graphql-mesh/transport-common';
import { processDirectives } from './directives/process.js';
const transport = {
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 default transport;
export { processDirectives } from './directives/process.js';
export { processScalarType } from './directives/scalars.js';