Remove unnecessary route in Koa example (#493)

It is my understanding that `POST` to `/graphiql` will never occur since GraphiQL will talk to `/graphql` directly. Since this is not needed we may want to remove it to avoid confusion.
This commit is contained in:
p4bloch 2017-08-09 08:34:56 -03:00 committed by Martijn Walraven
parent d102a88067
commit 7a4c9e3e75

View file

@ -125,7 +125,6 @@ const PORT = 3000;
router.post('/graphql', koaBody(), graphqlKoa({ schema: myGraphQLSchema })); router.post('/graphql', koaBody(), graphqlKoa({ schema: myGraphQLSchema }));
router.get('/graphql', graphqlKoa({ schema: myGraphQLSchema })); router.get('/graphql', graphqlKoa({ schema: myGraphQLSchema }));
router.post('/graphiql', graphiqlKoa({ endpointURL: '/graphql' }));
router.get('/graphiql', graphiqlKoa({ endpointURL: '/graphql' })); router.get('/graphiql', graphiqlKoa({ endpointURL: '/graphql' }));
app.use(router.routes()); app.use(router.routes());