Hi guys! Does anyone know how to write `permission...
# prisma-whats-new
m
Hi guys! Does anyone know how to write
permission query
to only allow each
user
to access its own
User object
?
t
use the lowercase
user
query
I think the same query can be used without EDITOR enum of course
m
I see, thank you very much! 😄
Copy code
query permitReadUser($user_id: ID!, $node_id: ID!) {
  SomeUserExists(filter: {
    AND: [{
      id: $user_id
    },{
    	id: $node_id
    }]
  })
}
I think this might be the solution.
p
yes I was thinking about that as well
👍 1