Allow POST requests with GraphQL

This commit is contained in:
Aurélien Georget 2016-02-29 15:41:31 +01:00
parent c89bad4949
commit f08409d336

View File

@ -115,10 +115,10 @@ module.exports = function (strapi) {
// Define GraphQL route to GraphQL schema
// or disable the global variable
if (this.defaults.graphql.enabled === true) {
strapi.router.get(this.defaults.graphql.route, strapi.middlewares.graphql({
strapi.app.use(strapi.middlewares.mount(this.defaults.graphql.route, strapi.middlewares.graphql({
schema: strapi.schemas,
pretty: true
}));
})));
} else {
global.graphql = undefined;
}