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