Is it possible to have multiple schema files in the prisma directory? From what I'm reading, it's possible but I need to reference it in the
prisma generate
call?
✅ 1
👀 1
Nigel Greenway
06/24/2022, 9:59 PM
My desired outcome is to have smaller schema files for neatness, readability and to reduce the risk of conflicts
s
Sabin Adams
06/27/2022, 8:56 PM
@Nigel Greenway You can have multiple schema files and run them individually, however you cannot combine schemas into one generated client.
In other words, you cannot split a large schema into smaller, more organized schemas yet.
I do, however, have a library I've written called Aurora that allows you to split the schema up.
Keep in mind, however, the library is in-progress, imperfect, and does not yet support all of the features Prisma does.
Sabin Adams
06/27/2022, 8:59 PM
There is a very active issue on github tracking the discussion on this topic. There is also a card dedicated to this topic on the Prisma roadmap.
Definitely give the issue a 👍 to help raise the amount of discussion and interest.
n
Nigel Greenway
06/28/2022, 6:22 AM
Hey @Sabin Adams, thank's - I'll take a look later today