zenstack icon indicating copy to clipboard operation
zenstack copied to clipboard

[Feature Request] Add support for Deno

Open rkawajan opened this issue 1 year ago • 4 comments

rkawajan avatar Jan 23 '24 17:01 rkawajan

Hi @rkawajan , using with Deno is completely untested and I guess it'll require a good amount of work to support. How important is this to you? Do you mind sharing your scenario using ZenStack? Thanks!

ymc9 avatar Jan 25 '24 14:01 ymc9

Hi @ymc9 I'm not sure what @rkawajan's use-case is but using Supabase as a backend and using their Edge Functions functionality, forces the use of Deno. In that case, is it still possible to use Zenstack / the access policies? Take, for example, an edge function that is called from the FE, does a bunch of backend things, and then inserts/updates into a model. In order to still use the Zenstack access policies, you would need to call an endpoint with an enhanced prisma instance, I'd think?

rcwestlake avatar Mar 18 '24 20:03 rcwestlake

Yes, Supabase function is a good use case. Do you currently use it? I was thinking that Supabase function users will most likely use it together with RLS, although I guess nothing should stop you from using Prisma there 😄.

ymc9 avatar Mar 20 '24 02:03 ymc9

I haven't gotten to the functions yet - that's come soon. That's interesting... so in a Supabase project (assuming the use of functions), access would need to be defined in two places:schema.zmodel for client-side queries and RLS for functions? Feels like that's duplication and a risk of apply changes in one and not the other.

rcwestlake avatar Mar 20 '24 19:03 rcwestlake