UNPKG

290 BJavaScriptView Raw
1'use strict';
2
3const Handlers = require('./handlers');
4
5
6const routes = module.exports = [];
7
8const handlerKeys = Object.keys(Handlers);
9for (const key of handlerKeys) {
10 routes.push({
11 method: 'graphql',
12 path: `/${key}`,
13 handler: { graphql: { method: Handlers[key] } }
14 });
15}