Query for enum value in GraphQL
<p>Suppose I have a model like this</p>

<pre><code>class Order(models.Model):
    STATES = [
        (1, 'Initiate'),
        (2, "Brief"),
        (3, "Planning"),
        (4, "Price Negotiate"),
        (5, "Executing"),
        (6, "Pending"),
        (7, "Completed"),
        (8, "Canceled"),
        (9, "Failed"),
        (10, "Paid"),
    ]

    state = models.PositiveSmallIntegerField(
        choices=STATES,
        default=1
    )
</code></pre>

<p>When I pair this model with its Graphene object type companion</p>

<pre><code>class OrderNode(graphene_django.DjangoObjectType):
    class Meta:
        model = Order
        interfaces = (relay.Node,)
</code></pre>

<p>An enum type with name <code>OrderState!</code> is created.</p>

<p>I am concerned with</p>

<ol>
<li>How can I query for the enums</li>
<li>How can I manage enums in React with Apollo client</li>
</ol>

<p>For the first question, I have this query</p>

<pre><code>{
  customer(id: "Q3VzdG9tZXJOb2RlOjE=") {
    name
    orders {
      edges {
        node {
          state
        }
      }
    }
  }
}
</code></pre>

<p>It gives me a weird state value like <code>A_1</code> and <code>A_2</code>. I was expecting it to give me some meaningful value like "Initiate". How can I get the value of the kv pair enum?</p>

<p>For the second question, if I want to present to user a list of possible value for this enum, how can I do so?</p>