strawberry-django-plus
strawberry-django-plus copied to clipboard
create and update mutations don't execute full_clean on Foreign Keys
Given a model:
@gql.django.input(Address)
class AddressType:
line1: str
line2: str
@gql.django.input(User)
class UserType:
first_name: gql.auto
last_name: gql.auto
address: Optional[AddressType]
Current behavior:
Executing create (or update) mutation does not run Address.full_clean()
Expected behavior:
Executing create (or update) mutation does run Address.full_clean()
and collects all errors from User
and Address
, errors from Address
are either nested or the field value uses dot notation (i.e. address.line1
)
Affecting code: Result of this line