I discovered weird behaviour (bug?). when creating...
# prisma-whats-new
l
I discovered weird behaviour (bug?). when creating user with given schema
Copy code
type User {
  id: ID! @unique
  createdAt: DateTime!
  updatedAt: DateTime!
  
  email: String @unique
  password: String
  facebookUserId: String @unique
  firstName: String
  lastName: String
  accounts: [Account!]! @relation(name: "UsersAccount")
}
sometimes I receive error:
Error: GraphQL error: A unique constraint would be violated on User. Details: Field name = email
even though given email address doesn’t exist in database. What’s more interesting, user is created! So I receive error, then I’m quering to display all the users and see the user was created. What is going on?
👍 1
@nilan this is actually crucial. Can you help me with that? It seems like uniqueness validator might not working properly