diff --git a/graphene_django/forms/mutation.py b/graphene_django/forms/mutation.py index 3db5dd7..32c40b3 100644 --- a/graphene_django/forms/mutation.py +++ b/graphene_django/forms/mutation.py @@ -10,7 +10,6 @@ from graphene.types.mutation import MutationOptions # InputObjectType, # ) from graphene.types.utils import yank_fields_from_attrs -from graphene.utils.str_converters import to_camel_case from graphene_django.registry import get_global_registry from ..types import ErrorType @@ -45,13 +44,7 @@ class BaseDjangoFormMutation(ClientIDMutation): if form.is_valid(): return cls.perform_mutate(form, info) else: - errors = [ - ErrorType( - field=to_camel_case(key) if key != "__all__" else key, - messages=value, - ) - for key, value in form.errors.items() - ] + errors = ErrorType.from_errors(form.errors) return cls(errors=errors)