Open tokr-bit opened 11 months ago
Hey @tokr-bit ,
Thanks for reporting this!
I'm wondering if https://github.com/strawberry-graphql/strawberry-graphql-django/pull/394 will also fix this issue?
cc @sdobbelaere
Hey,
update_m2m
method is not changed. If you and @sdobbelaere support the feature request, I can supply a PR.@tokr-bit I would appreciate this fix. I feel this would be something I'd run into myself as well during my project.
Summary
If a nested field is updated via the parent field, a validation on the nested field should be performed, if some validators are provided on the django field.
Feature Request Type
Description
Assuming we have a Parent model with some nested fields:
We create some types and a create mutation:
No matter which value is passed to the URL Field of the
Child
, the validator is not executed.Solution
Reason is that the
update_m2m
method in resolvers.py does not execute afull_clean
on the respective object.Upvote & Fund