add full defaultMedusaSchema

This commit is contained in:
Pedro Guzman
2025-06-09 14:20:21 +02:00
parent 0409ef4886
commit 0fd0a0892b
2 changed files with 6 additions and 1 deletions

View File

@@ -83,6 +83,8 @@ export const toGraphQLSchema = <T extends any[]>(entities: T): string => {
})
const defaultMedusaSchema = `
scalar DateTime
scalar JSON
directive @enumValue(value: String) on ENUM_VALUE
`

View File

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