Hi friends, I am looking for a good way to handle ...
# orm-help
s
Hi friends, I am looking for a good way to handle permissions w/ Prisma. I am using nexus to define my GraphQL schema. Just found out that it exposes an authorize hook. Inside of it I want to enforce some authorization logic. I came across the casbin (https://casbin.org/en/) access control library which is also available for node.js. I wonder how I can integrate Prisma w/ casbin. I think the following authorization syntax is neat. Overall, I am looking for a django-guardian style object-level authorization handling in Prisma. What do you guys think?
j
I think most of this can be solved with graphql-shield. At least that's what I personally use.
s
Hi thanks it works, but looking for something integrated into nexus. Found an ongoing discussion about this topic here https://github.com/prisma/nexus/pull/23
j
That discussion looks promising! Would totally be down for a native Nexus implementation! Thanks for sharing! 🙂