have you thought about row-level security too, eg ...
# prisma-whats-new
j
have you thought about row-level security too, eg when i ask for all Posts, can I enforce it to filter by only that user id who requested it
l
That'll be a function of the normal resolver.
That's not really a permissions problem but functionality, e.g. show me my own posts
So for instance, if you want a user level posts query for signed in users...
Copy code
type Query {
    posts: [Post!]!  @isAuthenticated
}
If you want a "super user" that can read all posts..
Copy code
type Query {
   allPosts: [Post!]! @hasRole(roles: ["ADMIN"])
}
Does that make sense?
j
okay, hopefully it will as i learn about the system more
thank you
f
Sounds like Postgres magic xD