I have come up with two ideas:
- split Prisma schemas between modules, joining them in the schema.prisma in the app using the framework
- generate a unique Prisma client for each module, export the typings and merge them with the app’s Prisma client
The other problem that I must think about is how to manage migrations for the framework’s modules.
With the first solution, all migrations are in the app, as usual.
With the second I think that framework’s migrations should be executed with a custom solution, complex but keeps things modularized.
Has anyone done that kind of schema splitting? Suggestions?