Closed
Description
Hi there!
I'd like to know the better way to raise an exception on a Mutation. For example, while trying to create a User with an email address that already exists.
if email
user = User.objects.filter(email=email).first()
if user:
# ?
return CreateUser(username=username, password=password)
I know that I can raise Exception('message')
, but is this the best way? Can we do it differently?
Thanks!
Metadata
Metadata
Assignees
Labels
No labels