graphql-python / graphql-python/graphene-django

DjangoFormMutation does not generate enum from forms.ChoiceField

Open
#1,040 6 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

* **What is the current behavior?**
``` python

GEEKS_CHOICES =(("1", "One"), ("2", "Two"))

class UpdateUserStateInTradeForm(forms.Form):
state = forms.ChoiceField(choices=GEEKS_CHOICES)

# mutation
class UpdateUserStateInTradeMutation(DjangoFormMutation):
class Meta:
form_class = UpdateUserStateInTradeForm

# generated schema

state: String!
```

* **What is the expected behavior?**

state is enumeration

* **Please tell us about your environment:**

- Version: 2.13.0, Django 3.0.1
- Platform: Linux

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.