Show warning when collections have no GraphQL-enabled fields

This commit is contained in:
SachaG 2018-06-20 10:24:57 +09:00
parent 994c19a98d
commit a7081f71c1

View file

@ -321,6 +321,9 @@ export const GraphQLSchema = {
}
graphQLSchema = schemaFragments.join('\n\n') + `\n\n\n`;
} else {
// eslint-disable-next-line no-console
console.log(`// Warning: collection ${collectionName} doesn't have any GraphQL-enabled fields, so no corresponding type can be generated. Pass generateGraphQLSchema = false to createCollection() to disable this warning`)
}
return graphQLSchema;