Once the data is stored online, it can be fetched as well. A query for the type of data to be fetched is created. On the fetch, a variety of filters can be set. These are set as table input filters such as values to match. This is how you can fetch posts for just one user for example. The completion handler receives the results.
- [Instructor] This will probably…be the most typing that we've done so far,…and it's still not that much.…But we're going to be fetching our posts.…So in the thoughtstvc dot swf file,…do a search for fetch posts.…Notice there's a to-do there,…and currently it just maybe creates a dummy post.…Let's just delete this whole…function contents, lines 120 to 132.…So in here, we want to make sure…that the user is signed in, first of all.…So we're going to say guard,…AWSMobileClient dot shared instance…dot is signed in else return.…
Now that we know we've got an…online user, let's write the query.…So on line 122, I'll type let q…equal list posts query, open close 'param',…and I'm going to get all the posts.…This is like a social networking thoughts app.…Otherwise we could use the filter…and put like we did for the settings…to get only a subset of the thoughts.…And you could add that kind of functionality too,…if you were looking for values that…were by certain users and so forth.…So now, we're going to write app sync dot client,…
- 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.