Files
30-seconds-of-code/node_modules/graphql-playground-middleware-express/dist/index.js
2019-08-20 15:52:05 +02:00

13 lines
487 B
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var graphql_playground_html_1 = require("graphql-playground-html");
var express = function voyagerExpress(options) {
return function (req, res, next) {
res.setHeader('Content-Type', 'text/html');
var playground = graphql_playground_html_1.renderPlaygroundPage(options);
res.write(playground);
res.end();
};
};
exports.default = express;
//# sourceMappingURL=index.js.map