atlasgql
Version:
A self-composing GraphQL server library using TypeScript, Express and Apollo Server
15 lines • 402 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.compose = void 0;
const defaultContext = ({ req, res }) => ({
cookie: req.headers.cookie,
});
const compose = (context) => {
return (args) => ({
...defaultContext(args),
...context(args),
});
};
exports.compose = compose;
exports.default = defaultContext;
//# sourceMappingURL=index.js.map