Why doesn't my registration mutation work with the role field?
I written the following code but can't figure out why my role enum doesn't work with my mutation.
I uploaded my code to github Github code.
The registration mutation works:
mutation{
registerUser(input:{email:"a@a.com", password:"a@a.com", role:"user",passwordConfirmation:"a@a.com"}){
email
}
}
But when i try my login mutation it fails:
mutation{
loginUser(input:{email:"a@a.com", password:"a@a.com", role:"user"}){
token
user{
email
}
}
}
And I get this error::
"# KeyError at POST /api/graphiql\n\nException:\n\n
** (KeyError) key :role not found in: %{email: \"a@a.com\", password: \"a@a.com\"}\n