2018-09-11 14:11:24 +03:00
|
|
|
Mutations
|
|
|
|
=========
|
|
|
|
|
2018-12-03 15:12:24 +03:00
|
|
|
.. contents:: Table of contents
|
|
|
|
:backlinks: none
|
|
|
|
:depth: 1
|
|
|
|
:local:
|
2018-09-11 14:11:24 +03:00
|
|
|
|
2019-01-21 12:20:14 +03:00
|
|
|
GraphQL mutations are used to modify data on the server (i.e. write, update or delete data).
|
|
|
|
|
|
|
|
Hasura GraphQL engine auto-generates mutations as part of the GraphQL schema from your Postgres schema model.
|
|
|
|
|
|
|
|
Data of all tables in the database tracked by the GraphQL engine can be modified over the GraphQL endpoint.
|
|
|
|
If you have a tracked table in your database, its insert/update/delete mutation fields are added as nested
|
|
|
|
fields under the ``mutation_root`` root level type.
|
2018-09-11 14:11:24 +03:00
|
|
|
|
2018-12-03 15:12:24 +03:00
|
|
|
Types of mutation requests
|
|
|
|
--------------------------
|
2018-09-11 14:11:24 +03:00
|
|
|
|
2019-01-21 12:20:14 +03:00
|
|
|
The following types of mutation requests are possible:
|
2018-09-11 14:11:24 +03:00
|
|
|
|
|
|
|
.. toctree::
|
|
|
|
:maxdepth: 1
|
|
|
|
|
|
|
|
Insert <insert>
|
|
|
|
Upsert <upsert>
|
|
|
|
Update <update>
|
|
|
|
Delete <delete>
|
|
|
|
multiple-mutations
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|