Skip to content

GraphQL Mutations

GraphQL mutations are used to create, update, and delete data via the workspace API.

Archie Core’s GraphQL engine auto-generates mutations as part of the GraphQL schema based on your project tables. All project tables can recieve mutations through the project endpoint.

In the following examples, we have a table called students, which contains fields and relations like firstName, email, age.

Whenever a table is added to a work space, four GraphQL mutation operations are auto-generated for the table. They are:

  • createTableName(...) - Accepts input as an argument from which it will populate a new record in the database table.
  • createTableNameMany(...) - Accepts input as an argument from which it will populate one or more new records in the database table.
  • updateTableName(...) - Accepts input and id as arguments with which it will update an existing record.
  • deleteTableName(...) - Accepts id as arguments with which it will delete an existing record.

alt text