In this guide, you will learn how to create, update, and delete your data using Amplify Libraries' GraphQL client.
Before you begin, you will need:
Run mutations to create, update, and delete application dataIn GraphQL, mutations are APIs that are used to create, update, or delete data. This is different than queries, which are used to read the data but not change it. The following examples demonstrate how you can create, update, and delete items using the Amplify GraphQL client.
Create an itemYou can run a GraphQL mutation with Amplify.API.mutate
to create an item.
Make sure you have the following imports at the top of your file:
You can run a GraphQL mutation with Amplify.API.mutate
. Make sure you have the following imports at the top of your file:
To update data, replace the request with .update
.
To delete data, replace the request with .delete
.
Congratulations! You have finished the Create, update, and delete application data guide. In this guide, you created, updated, and deleted your app data through the GraphQL API.
Next stepsOur recommended next steps include using the API to query data and subscribe to real-time events to look for mutations in your data. Some resources that will help with this work include:
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4