Skip to content

API – Mutations

Mutations provide write access to schema-defined data.

Characteristics

  • Write rules are enforced
  • Classifications are evaluated during execution
  • Fully transactional per request

Create Row (add_<entity>)

Creates a new row in the target table.

Example – Create Person

mutation {
  add_person(input: { first_name: "Anna", last_name: "Larsson" }) {
    id
    _id
  }
}

Update Row (edit_<entity>)

Edits an existing row identified by id or _id.

Example – Update by id

mutation {
  edit_person(id: 123, input: { last_name: "Svensson" }) {
    id
    last_name
  }
}

Example – Update by _id

mutation {
  edit_person(_id: "external-42", input: { first_name: "Anna" }) {
    id
    first_name
  }
}

Delete Row (delete_<entity>)

Deletes an existing row identified by id or _id.

Example – Delete by id

mutation {
  delete_person(id: 123)
}

Example – Delete by _id

mutation {
  delete_person(_id: "external-42")
}

Relation Mutation

Relation mutations are performed through nested inputs using the _action field. They are documented separately in API – Relationship Editing.