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:

mutation insert_relay_author {
  insert_author(
    objects: {
      name: "Chris"
      username: "urschris"
    }
  ){
    affected_rows
    returning{
      id
      name
      username
    }
  }
}
mutation insert_relay_author { insert_author( objects: { name: "Chris" username: "urschris" } ){ affected_rows returning{ id name username } } }
{ "data": { "insert_author": { "affected_rows": 1, "returning": [ { "id": "WzEsICJwdWJsaWMiLCAiYXV0aG9yIiwgOF0=", "name": "Chris", "username": "urschris" } ] } } }