add full defaultMedusaSchema
This commit is contained in:
2 files changed
+6
-1
No files matched your search
@@ -83,6 +83,8 @@ export const toGraphQLSchema = <T extends any[]>(entities: T): string => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
const defaultMedusaSchema = `
|
const defaultMedusaSchema = `
|
||||||
|
scalar DateTime
|
||||||
|
scalar JSON
|
||||||
directive @enumValue(value: String) on ENUM_VALUE
|
directive @enumValue(value: String) on ENUM_VALUE
|
||||||
`
|
`
|
||||||
|
|
||||||
|
|||||||
@@ -1253,7 +1253,10 @@ export function buildSchemaObjectRepresentation(schema: string): {
|
|||||||
} as IndexTypes.SchemaObjectRepresentation
|
} as IndexTypes.SchemaObjectRepresentation
|
||||||
|
|
||||||
Object.entries(entitiesMap).forEach(([entityName, entityMapValue]) => {
|
Object.entries(entitiesMap).forEach(([entityName, entityMapValue]) => {
|
||||||
if (!entityMapValue.astNode) {
|
if (
|
||||||
|
!entityMapValue.astNode ||
|
||||||
|
entityMapValue.astNode.kind === GraphQLUtils.Kind.SCALAR_TYPE_DEFINITION
|
||||||
|
) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user