From f08409d336071512a9353bfec084fa0ce67ed2dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Georget?= Date: Mon, 29 Feb 2016 15:41:31 +0100 Subject: [PATCH] Allow POST requests with GraphQL --- lib/configuration/hooks/router/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/configuration/hooks/router/index.js b/lib/configuration/hooks/router/index.js index 30f48ffc60..bc06a6867f 100644 --- a/lib/configuration/hooks/router/index.js +++ b/lib/configuration/hooks/router/index.js @@ -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; }