Open
Description
I am using this library to do introspection on my Prisma schema dynamically. This almost works, except I have to maintain an object that maps the name of the model to the corresponding schema generated. I have to make one of these for every type of schema generated (optional defaults, scalar fields, relations, etc.). It would be convenient if this library automatically generated those mappings.
As an example, say you have a schema with Users, Posts, and Comments. The generated mappings would look as follows
const ModelToSchema = {
User: UserSchema,
Post: PostSchema,
Comment: CommentSchema
}
const ModelToScalarFieldEnumSchema = {
User: UserScalarFieldEnumSchema,
Post: PostScalarFieldEnumSchema,
Comment: CommentScalarFieldEnumSchema
}
Metadata
Metadata
Assignees
Labels
No labels