You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using the CASL Prisma package in my backend and at the moment returning an ability object for a user which looks like this:
I've checked that the returned permissions are as expected. However, asking can questions against the given abilities are returning false values.
My current guess is that CASL React is expecting to parse the Mongoose query language and has no idea what to do with the Prisma language in: [] vs $in:[].
Is this right? Do I have a workaround or solution to this?
Here's an example of how the AppAbilities are setup in the FE:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Stack: Prisma, GraphQL, React
I'm using the CASL Prisma package in my backend and at the moment returning an ability object for a user which looks like this:
I've checked that the returned permissions are as expected. However, asking can questions against the given abilities are returning false values.
My current guess is that CASL React is expecting to parse the Mongoose query language and has no idea what to do with the Prisma language
in: []
vs$in:[]
.Is this right? Do I have a workaround or solution to this?
Here's an example of how the AppAbilities are setup in the FE:
Beta Was this translation helpful? Give feedback.
All reactions