Skip to content

Commit bc2393f

Browse files
committed
Update README.
1 parent 174a0bb commit bc2393f

File tree

1 file changed

+17
-5
lines changed

1 file changed

+17
-5
lines changed

README.md

+17-5
Original file line numberDiff line numberDiff line change
@@ -164,10 +164,7 @@ class RealHumanBean(models.Model):
164164
R.Human.CanBe(Human)
165165
```
166166

167-
## Relay Support (WIP)
168-
- [x] Node
169-
- [x] Connection & Edges
170-
- [ ] Mutations
167+
## Relay Support
171168

172169
At this point, Epoxy has rudimentary `relay` support. Enable support for `Relay` by mixing in the `RelayMixin` using
173170
`TypeResolver.Mixin`.
@@ -206,6 +203,21 @@ class Query(R.ObjectType):
206203

207204
```
208205

206+
### Mutations
207+
```python
208+
class SimpleAddition(Relay.Mutation):
209+
class Input:
210+
a = R.Int
211+
b = R.Int
212+
213+
class Output:
214+
sum = R.Int
215+
216+
def execute(self, obj, input, info):
217+
return self.Output(sum=input.a + input.b)
218+
219+
```
220+
209221
### Adding some data!
210222
Let's add some pets to the `data_source` and query them!
211223

@@ -254,7 +266,7 @@ result = graphql(Schema, '''
254266
```
255267

256268

257-
## Mutations (Coming Soon)
269+
## Mutations
258270

259271
Epoxy also supports defining mutations. Making a Mutation a Relay mutation is as simple as changing `R.Mutation` to
260272
`Relay.Mutation`.

0 commit comments

Comments
 (0)