Relay API Reference - Mutation¶
The Mutation API is similar to GraphQL mutation
except that the id
field in the table object resolves to Relay Node interface’s
id
.
Example:
GraphiQL
1
mutation insert_relay_author {
2
insert_author(
3
objects: {
4
name: "Chris"
5
username: "urschris"
6
}
7
){
8
affected_rows
9
returning{
10
id
11
name
12
username
13
}
14
}
15
}
Variables
x
1
xxxxxxxxxx
{
"data": {
"insert_author": {
"affected_rows": 1,
"returning": [
{
"id": "WzEsICJwdWJsaWMiLCAiYXV0aG9yIiwgOF0=",
"name": "Chris",
"username": "urschris"
}
]
}
}
}
Was this page helpful?
Thank you for your feedback!