mirror of
https://github.com/strapi/strapi.git
synced 2025-11-05 12:24:35 +00:00
Allow the use of .graphql or .graphql.js
Previously schema files could only end in .graphql files. This caused a problem with IDE's since these files are actually javascript files. This pull request should also detect ```.graphql.js``` files while keeping backward compatibility with the ```.graphql``` extension.
This commit is contained in:
parent
651cf3198b
commit
dc7f06194f
@ -35,7 +35,7 @@ module.exports = strapi => {
|
|||||||
// Load root configurations.
|
// Load root configurations.
|
||||||
new Promise((resolve, reject) => {
|
new Promise((resolve, reject) => {
|
||||||
glob(
|
glob(
|
||||||
'./config/*.graphql',
|
'./config/*{.graphql,.graphql.js}',
|
||||||
{
|
{
|
||||||
cwd: strapi.config.appPath,
|
cwd: strapi.config.appPath,
|
||||||
},
|
},
|
||||||
@ -54,7 +54,7 @@ module.exports = strapi => {
|
|||||||
// Load APIs configurations.
|
// Load APIs configurations.
|
||||||
new Promise((resolve, reject) => {
|
new Promise((resolve, reject) => {
|
||||||
glob(
|
glob(
|
||||||
'./api/*/config/*.graphql',
|
'./api/*/config/*{.graphql,.graphql.js}',
|
||||||
{
|
{
|
||||||
cwd: strapi.config.appPath,
|
cwd: strapi.config.appPath,
|
||||||
},
|
},
|
||||||
@ -73,7 +73,7 @@ module.exports = strapi => {
|
|||||||
// Load plugins configurations.
|
// Load plugins configurations.
|
||||||
new Promise((resolve, reject) => {
|
new Promise((resolve, reject) => {
|
||||||
glob(
|
glob(
|
||||||
'./plugins/*/config/*.graphql',
|
'./plugins/*/config/*{.graphql,.graphql.js}',
|
||||||
{
|
{
|
||||||
cwd: strapi.config.appPath,
|
cwd: strapi.config.appPath,
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user