diff --git a/packages/core/modules-sdk/src/medusa-app.ts b/packages/core/modules-sdk/src/medusa-app.ts index e626f851d3..77131903d6 100644 --- a/packages/core/modules-sdk/src/medusa-app.ts +++ b/packages/core/modules-sdk/src/medusa-app.ts @@ -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 }), diff --git a/packages/modules/index/src/utils/base-graphql-schema.ts b/packages/modules/index/src/utils/base-graphql-schema.ts index c07e804ec1..2a29024b99 100644 --- a/packages/modules/index/src/utils/base-graphql-schema.ts +++ b/packages/modules/index/src/utils/base-graphql-schema.ts @@ -3,5 +3,4 @@ export const baseGraphqlSchema = ` scalar Date scalar Time scalar JSON - directive @enumValue(value: String) on ENUM_VALUE `