Updated v3 release notes (markdown)

Jonathan Kim 2020-07-11 10:47:19 +01:00
parent 97c5114d1b
commit fb64c1941e

@ -88,7 +88,40 @@ TODO
### Enum inputs
TODO
As outlined above: if a field takes an Enum as an input the resolver will now get passed the Enum member rather than the member value.
For example, given the following schema:
```python
from graphene import Enum, ObjectType, String, Schema
class Color(Enum):
RED = 1
GREEN = 2
BLUE = 3
class Query(ObjectType):
color = String(color_input=Color(required=True))
def resolve_color(root, info, color_input):
return color_input
schema = Schema(query=Query)
```
Before:
```python
result = schema.execute("query { color(colorInput: RED) }")
assert result.data["color"] == "1"
```
After:
```python
result = schema.execute("query { color(colorInput: RED) }")
assert result.data["color"] == "EnumMeta.RED"
```
---