graphql-python / graphql-python/graphene-django

to_field_name is not honoured in ModelChoiceField in DjangoFormMutation

Open
#898 3 comments 0 reactions 0 assignees View on GitHub
🐛bug
Dominant language
Python
Stars
4.4k
Forks
760
PR merge metrics
No merged PRs in 30d

Description

I'm trying to pick a model instance by another unique column.

`email = forms.ModelChoiceField(queryset=User.objects.all(), to_field_name="email")`

but it's guessing the `email` input as `ID` in the schema whereas it should've been generated as `String`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.