restore base schema in cleanAndMergeSchema in case modules define their own schemas
This commit is contained in:
@@ -231,8 +231,14 @@ function isMedusaModule(mod) {
|
||||
}
|
||||
|
||||
function cleanAndMergeSchema(loadedSchema) {
|
||||
const { schema: cleanedSchema, notFound } =
|
||||
GraphQLUtils.cleanGraphQLSchema(loadedSchema)
|
||||
const defaultMedusaSchema = `
|
||||
scalar DateTime
|
||||
scalar JSON
|
||||
directive @enumValue(value: String) on ENUM_VALUE
|
||||
`
|
||||
const { schema: cleanedSchema, notFound } = GraphQLUtils.cleanGraphQLSchema(
|
||||
defaultMedusaSchema + loadedSchema
|
||||
)
|
||||
const mergedSchema = GraphQLUtils.mergeTypeDefs(cleanedSchema)
|
||||
return {
|
||||
schema: GraphQLUtils.makeExecutableSchema({ typeDefs: mergedSchema }),
|
||||
|
||||
Reference in New Issue
Block a user