Allow passing custom gql schema function to ParseServer#start options (#6762)

This commit is contained in:
Luca
2020-07-10 21:52:39 +02:00
committed by GitHub
parent e848b541bd
commit 4437ea73ba

View File

@@ -270,7 +270,7 @@ class ParseServer {
graphQLCustomTypeDefs = parse(
fs.readFileSync(options.graphQLSchema, 'utf8')
);
} else if (typeof options.graphQLSchema === 'object') {
} else if (typeof options.graphQLSchema === 'object' || typeof options.graphQLSchema === 'function') {
graphQLCustomTypeDefs = options.graphQLSchema;
}