can someone please help me with this permissions q...
# prisma-whats-new
j
can someone please help me with this permissions query - I want it to be OR not AND
Copy code
# User can only read projects that belong to the same client or User is Admin
query read($node_id: ID!, $user_id: ID!) {
  SomeProjectExists(
    filter: {
      id: node_id,
      client: {
        users_some: {
          id: $user_id
        }
      }
    })
  SomeUserExists(
    filter: {
      id: $user_id,
      userType: Admin
    })
}
n
define two separate permission queries, one for
SomeProjectExist
, one for
SomeUserExists
.
👍 1
j
how do I combine those in the same file?
Query Permission Error for permission 'NoName': There was more than one query and you did not provide a query name
n
j
😄 thanks! - working now