Merge pull request #2165 from greatwitenorth/patch-2

Allow the use of .graphql or .graphql.js
This commit is contained in:
Jim LAURIE 2018-11-01 17:39:57 +01:00 committed by GitHub
commit 30370a1b0d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -35,7 +35,7 @@ module.exports = strapi => {
// Load root configurations.
new Promise((resolve, reject) => {
glob(
'./config/*.graphql',
'./config/*.graphql?(.js)',
{
cwd: strapi.config.appPath,
},
@ -54,7 +54,7 @@ module.exports = strapi => {
// Load APIs configurations.
new Promise((resolve, reject) => {
glob(
'./api/*/config/*.graphql',
'./api/*/config/*.graphql?(.js)',
{
cwd: strapi.config.appPath,
},
@ -73,7 +73,7 @@ module.exports = strapi => {
// Load plugins configurations.
new Promise((resolve, reject) => {
glob(
'./plugins/*/config/*.graphql',
'./plugins/*/config/*.graphql?(.js)',
{
cwd: strapi.config.appPath,
},