UNPKG

graphql-anywhere-mongodb-express

Version:

express middleware that accepts graphql requests and runs them as mongo queries

17 lines 493 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const tslib_1 = require("tslib"); function handleAsync(handler) { return (req, res, next) => tslib_1.__awaiter(this, void 0, void 0, function* () { try { Promise .resolve(handler(req, res, next)) .catch(next); } catch (err) { next(err); } }); } exports.handleAsync = handleAsync; //# sourceMappingURL=handle-async.js.map