Field names in validation errors are different from schema
I have a form which has a python field raw_description which ends up in schema as rawDescription. However if field doesn't have a valid value I get a validation error for field raw_description which is not in schema.
class UpdateEventModelForm(forms.ModelForm):
raw_description = forms.CharField()
class Meta:
model = EventModel
fields = ('name', 'from_date', 'to_date')
mutation updateEvent($input: UpdateEventInput!) {
updateEvent(input: $input) {
errors {
field
messages
}
}
}
{
"input": {
"id": 123,
"rawDescription": ""
}
}
Response
{
"data": {
"updateEvent": {
"errors": [
{
"field": "raw_description",
"messages": [
"This field is required."
]
}
],
"event": null
}
}
}
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Not stale
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Not stale
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Issue stale is not
-- Yoda
@igo I'm assuming you're using graphene-django here? Have you tried the CAMELCASE_ERRORS setting? https://docs.graphene-python.org/projects/django/en/latest/settings/#camelcase-errors