@graphql-mesh/transport-soap
Version:
15 lines (14 loc) • 574 B
JavaScript
import { createExecutorFromSchemaAST } from './executor.js';
export { createExecutorFromSchemaAST } from './executor.js';
export default {
getSubgraphExecutor({ transportEntry, subgraph, fetch, logger }) {
let headers;
if (typeof transportEntry.headers === 'string') {
headers = JSON.parse(transportEntry.headers);
}
if (Array.isArray(transportEntry.headers)) {
headers = Object.fromEntries(transportEntry.headers);
}
return createExecutorFromSchemaAST(subgraph, fetch, headers, logger);
},
};