Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make errors in form mutation non nullable #1286

Merged
merged 1 commit into from Sep 23, 2022

Conversation

artofhuman
Copy link
Contributor

DjangoModelFormMutation does not return null in errors field. If form is valid, errors will be empty array. If form invalid, errors will be filled as ErrorType.
Specification https://spec.graphql.org/June2018/#sec-Type-System.Non-Null says in this case non-null values should be returned. So it makes sense to simplify type validation on client-side.

Copy link
Collaborator

@keithhackbarth keithhackbarth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks simple and straightforward enough for me. Nice work.

@firaskafri firaskafri self-requested a review September 22, 2022 17:23
@firaskafri firaskafri merged commit 0f40da7 into graphql-python:main Sep 23, 2022
superlevure pushed a commit to loft-orbital/graphene-django that referenced this pull request Jul 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants