Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var entities: [Post] = []
- if startKey == nil {//nextToken == nil: no more posts
- return
- }
- let query = ListPostsQuery()
- query.limit = 2
- if startKey != "" {//when the app starts startKey == “”
- query.nextToken = startKey
- }
- appSyncClient?.fetch(query: query) {(result, error) in
- //code
- })
Add Comment
Please, Sign In to add comment