mirror of
https://github.com/strapi/strapi.git
synced 2025-11-03 11:25:17 +00:00
Allow POST requests with GraphQL
This commit is contained in:
parent
c89bad4949
commit
f08409d336
@ -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;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user