A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.amplify.aws/gen1/swift/build-a-backend/graphqlapi/mutate-data/ below:

Website Navigation


Create, update, and delete application data - Swift

Create, update, and delete application data

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 data

In 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 item

You 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:

Update an item

To update data, replace the request with .update.

Delete an item

To delete data, replace the request with .delete.

Conclusion

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 steps

Our 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