hi everyone, I was wondering how can I define a en...
# prisma-whats-new
j
hi everyone, I was wondering how can I define a enum and then assign it to a field in a type, something like this but doesn't seem to work for me:
Copy code
enum UserRole {
  ADMIN
}
type User implements Node {
  id: ID! @isUnique
  createdAt: DateTime!
  updatedAt: DateTime!
  email: String!
  password: String!
  role: UserRole!
}
n
that should work, maybe you need to split it up into two steps?
first define the enum, deploy, then use the enum field
j
mmm ok thanks I'm gonna try
by deploying you mean?
Copy code
graphcool push
I did that and now the enums have been removed
n
oh, what's your
graphcool version
?
j
1.3.7
ok I guess I shoud have installed graphcool with:
Copy code
npm install -g graphcool@next
ok now it's working, thanks!