Merge pull request #12684 from medusajs/pedro/keep-enum-values-in-types-generation

fix: keep enum values in types generation
fix: generate union types instead of enums
This commit is contained in:
Pedro Guzman
2025-06-13 13:15:56 +02:00
committed by GitHub
9 changed files with 150 additions and 15 deletions

View File

@@ -234,6 +234,7 @@ function cleanAndMergeSchema(loadedSchema) {
const defaultMedusaSchema = `
scalar DateTime
scalar JSON
directive @enumValue(value: String) on ENUM_VALUE
`
const { schema: cleanedSchema, notFound } = GraphQLUtils.cleanGraphQLSchema(
defaultMedusaSchema + loadedSchema