graphene
graphene copied to clipboard
Cannot query on a Django CharField with choices
I have a CharField with three choices, but when I try to query it in GraphiQL, I get this error:
"Cannot query field \"state\" on type ..."
state = models.CharField(
max_length=30,
choices=(('assigned', 'assigned'), ('accepted', 'accepted'), ('rejected', 'rejected')),
default='assigned'
)
Querying on a normal CharField seems to work. Why does it not work with CharField with choices?
(I'm using the latest version 0.10.2)
Hi @glusa8, I believe this is fixed in the development version.
Could you try using the latest version? (pip install "graphene-django>=1.0.dev")
Here is the upgrade guide
(please reopen the issue if the CharField with choices keeps happening in the latest version!)