As a complete platform, we focus not just on querying but creating and updating your app's data. Similar to queries, mutations must also have data/fields selected. You can ask for any nested fields. This is useful for fetching the new state of an object after an update.
You must specify three things when defining a mutation:
Name of the mutation, typically named after the type of modification you want to perform e.g.
CreateToDo...but it can be anything you want.
Input variable, passed as an argument to the mutation name that contains the data you want to send to the server.
Payload object, the data you want to send to the server.
- GraphQL Query
- Input Data