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
@@ -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
}