GraphQL Mutations
Mutations are used to modify data in a database. They are analogous to the INSERT
, UPDATE
and DELETE
commands in
SQL. Hasura provides a powerful and flexible GraphQL API to perform mutations.
Next steps
Currently, you can perform mutations via the GraphQL API using the following methods:
- Some data connectors support mutations out-of-the-box and — when
adding
commands
will generate them automatically. - If using a compatible data source — such as MongoDB — you can create a Native Query.
- You can mutate data via the TypeScript connector using the Command Query Separation (CQS) pattern. Learn more here.