Replies: 1 comment 4 replies
-
Glad you found us here 😄 @ozum , and thanks for the questions! Many of them should actually be included in a (now missing) FAQ section. Let me try to address them, and we can keep discussing this in more detail.
I checked your nuxt-prisma project, and the idea looks pretty cool. One thing I'm not sure about is if using Prisma client extensions is sufficient for isolating Postgres config/variables for concurrent requests. I tried to follow issue #5128 but still feel confused about where the safety boundary is 😂 . |
Beta Was this translation helpful? Give feedback.
-
Hi,
I just discovered this repo via prisma/prisma#5128 (comment). As a prospective user, I skimmed the docs but need some details. I'll be happy if I can get the info for the questions below. (Sorry for the number of questions)
schema.zmodel
and having aschema.base
(original raw prisma schema created by hand or generated from DB) and ZenStack merge/inject specific it's own parts to create a mergedschema.prisma
?a. Can I use RLS features with Supabase?
b. Is it possible to integrate Supabase's PostgreSQL session variables and PostgreSQL functions defined in the
auth
schema (for exampleauth.uid()
)? Maybe info below helps:Let me explain how I use Prisma with Nuxt and Supabase:
I developed an open-source Nuxt module for Prisma which has built-in Supabase support. It creates a Prisma client using a Prisma extension. It sets Supabase (or any other custom framework's PG session variables before returning the client) Please see https://github.com/ozum/nuxt-prisma/blob/main/src/runtime/server/middleware/prisma.ts file.
For the Supabase values see Line 12 of this file: https://github.com/ozum/nuxt-prisma/blob/main/src/module.ts
Maybe a similar method can be used to integrate ZenStack with Supabase.
Thanks,
Beta Was this translation helpful? Give feedback.
All reactions