Hacker News new | ask | show | jobs
by elementg 1080 days ago
I am a big proponent of DSL. I like the approach of using the schema as the business model, with the authorization part added on through Prisma. However, how do you keep up with changes to Prisma? Specifically, how long can I expect to use a new feature released by Prisma in ZenStack?
1 comments

Thanks for the comments. Great point about Prisma compatibility/future-proof.

First of all, ZenStack doesn't include or depend on any specific version of Prisma. You can freely use any version >=4.0.0.

Our decision to base ZenStack on Prisma has two implications: 1. We need to keep up with the changes in Prisma schema (design-time) 2. We need to keep up with the changes in Prisma Client (runtime)

For #1, Prisma's schema has been quite stable, at least since it reached V4. New features barely result in changes in the schema language. Quite often, they're guarded with the "previewFeatures" option, and that's pretty much it.

For #2, at runtime, ZenStack enhances Prisma client by creating a transparent proxy around it and intercepting CRUD calls that need to be guarded/injected. Again, that part of runtime API has been very stable for quite a few releases, so as long as the semantics of those APIs don't change, nothing needs to be done for new Prisma releases. However, there're cases where we need to keep up with new features. E.g, the new release of Prisma Pulse added a new "subscribe" API for live changes subscription, and we're working on adding it into the scope of access control.

That said, we need to (and do) keep a close eye on any schema/runtime changes that may require a timely follow-up.

Hope this explains, and let me know if anything is unclear.

clear enough, thanks.