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 authored and GitHub committed 2025-06-13 13:15:56 +02:00
commit ebd4d70b6b
9 files changed
+150 -15

No files matched your search

@@ -1253,7 +1253,10 @@ export function buildSchemaObjectRepresentation(schema: string): {
} as IndexTypes.SchemaObjectRepresentation
Object.entries(entitiesMap).forEach(([entityName, entityMapValue]) => {
if (!entityMapValue.astNode) {
if (
!entityMapValue.astNode ||
entityMapValue.astNode.kind === GraphQLUtils.Kind.SCALAR_TYPE_DEFINITION
) {
return
}