When you need to make changes to the data stored online, you can edit the schema. This can be done online but the schema online is built on the one you originally created locally. It is easier and faster to change the one model item locally and then push the changes to the server. Amplify makes this easy.
- [Narrator] So currently we're storing…the settings on the server,…but how do we fetch them?…How do we uniquely identify them?…Well one way would be through the ID.…That would uniquely identify settings,…but if the user's just logged in…on a new phone or something,…we don't know the ID of their settings.…We just know their user ID, and maybe their username.…So we need to be able to specify…the user ID related to the settings,…but that's not in our schema.…So what do we need to do?…We need to update our schema.…
So fortunately since we're using App Sync,…that's not that difficult to do.…So let's look at it.…So go to your terminal…and make sure you're in your project directory…and we're going to edit the schema.…If we look under amplify we'll see…that there's a back end folder…and under there there's an API folder…and under there there's a thoughts folder…and in here we have our schema.…So let's edit it.…So I'll do V I schema dot graph Q L…and all I have to do is add in here under the ID user ID…and I'll make that a string…
- 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
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.