To manipulate (Create, Update, Delete) your data in Unearth, you can use Mutations. You can think of Mutations as API endpoints that allow you to perform certain actions. In this reference, you can see a list of every available Mutation as well as the parameters these mutations accept.

Mutations accept input parameters, similar to functions in other programming languages. Mutations are able to return fields from the datatype it manipulates. You can define these return values in the body of the Mutation.

For example, if you wanted to alter a Users Role in an Account, you could use the following Mutation which would return the id and name of the Account

mutation MyMutation {
  modifyAccountUser(accountId: "my_account", roleName: "new_role", userId: "target_user_id") {

You can use GraphiQL to test Mutations in an in-browser UI. Learn how here

For help getting started using the Unearth API, see the Getting Started section

For step-by-step examples of how to use Mutations to perform actions, (like Asset Creation) see the Recipes section