Updating data online is very similar to creating it. This is true for many APIs to servers. Like with creation, you have to create an instance for the input data. That's then used to create the mutation. The same AppSync client instance is used to call perform with the mutation to perform on the server.
- [Instructor] So now we want to look at the case…where we need to update settings on the server.…In the case where we download these settings…which we'll do in the next video, we'll have an ID for that,…and when we need to update it, we'll use that ID.…And we can also use that to determine…if we need to update settings versus create them,…so let's look back at the code.…Okay, so now we're back in X code.…I'm going to kill the app and dismiss the debug consult.…So, if we don't already have settings,…in other words, if we're creating settings,…then our settings shouldn't have an ID.…
But we're not currently storing the ID for settings,…so we need to add that to our definition.…So in the settings dot swift file,…we need to look at the class called settings…and add a new property, so in line 33…I'll add a new line var ID equals open close…quotes for an empty string, and now we have the ID.…When we download that from the server,…we'll see how we're going to initialize that,…and then we'll know that we have existing settings.…
- Preparing to use AppSync in code
- Updating settings and the schema
- Adding a second data source
- Storing posts online
- Updating subscriptions in schema
- Testing live updates
- Handling updated posts
- Offline capabilities
Skill Level Intermediate
AWS Security Best Practices for Developerswith Carlos Rivas46m 31s Intermediate
1. AWS User Authentication
2. AppSync Setup
Amplify codegen3m 42s
3. App Code and Configuration
4. Adding a Second Datasource
5. Real-Time Updates
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.