In a permission query, are we allowed to use any f...
# prisma-whats-new
s
In a permission query, are we allowed to use any field from the User table? I'm taking this example from the docs:
Copy code
query permitViewDocuments($user_id: ID!) {
  SomeUserExists(filter: {
    id: $user_id
    role: ADMIN
  })
}
but instead of 'role' I'm using an enum I defined called userType, and I'm getting an error message saying userType is unknown field...
n
could you please try to reload the permission editor?
s
same pb...
n
how does the
User
model type look like?
s
so in the docs within the permission editor, i can't see my usertype field
Copy code
type User implements Node {
  auth0UserId: String @isUnique
  createdAt: DateTime!
  email: String @isUnique
  emailAddress: String
  galleries: [Gallery!]! @relation(name: "GalleryOnUser")
  id: ID! @isUnique
  isPhotographer: Boolean
  name: String
  password: String
  photos: [Photo!]! @relation(name: "PhotoOnUser")
  updatedAt: DateTime!
  userType: [UserType!]
}
Copy code
enum UserType {
  Photographer
  Admin
  Client
  Pending
}
n
there are no filters for lists of enums yet
s
ahhh dammit, it's because I've made usertype accept several values
s
ah i'm getting a related bug where I can't transform userType from multiple to single
it's saying i have to provide a 'migration value', i click 'save changes' and nothing happens
and i get no prompt for a migration value
ahh it was in the advanced tab
slightly confusing, the tab should swap when it's talking about the migration value