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 would like to make alterations to the where clause of every prisma query that runs to enforce row level security. I was able to do that at the top-level using extensions, but select/includes of relationships make it very difficult to identify existing or potential "where" clauses that need to be modified.
Suggested solution
I'd like some way to alter all where clauses. I would expect something like a function that would be called with every where clause (even empty ones). I would tweak them as needed and return the altered where clause.
Alternatives
A proposal for clientExtensions was discussed in October 2022 (#15074 (comment)). It referenced $nestedOperations. I believe that would meet my needs, but I couldn't find any reference to $nestedOperations after that point.
Additional context
The text was updated successfully, but these errors were encountered:
Problem
I would like to make alterations to the where clause of every prisma query that runs to enforce row level security. I was able to do that at the top-level using extensions, but select/includes of relationships make it very difficult to identify existing or potential "where" clauses that need to be modified.
Suggested solution
I'd like some way to alter all where clauses. I would expect something like a function that would be called with every where clause (even empty ones). I would tweak them as needed and return the altered where clause.
Alternatives
A proposal for clientExtensions was discussed in October 2022 (#15074 (comment)). It referenced $nestedOperations. I believe that would meet my needs, but I couldn't find any reference to $nestedOperations after that point.
Additional context
The text was updated successfully, but these errors were encountered: