mirror of
https://github.com/strapi/strapi.git
synced 2025-11-12 08:08:05 +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
|
// Define GraphQL route to GraphQL schema
|
||||||
// or disable the global variable
|
// or disable the global variable
|
||||||
if (this.defaults.graphql.enabled === true) {
|
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,
|
schema: strapi.schemas,
|
||||||
pretty: true
|
pretty: true
|
||||||
}));
|
})));
|
||||||
} else {
|
} else {
|
||||||
global.graphql = undefined;
|
global.graphql = undefined;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user