aws-samples/aws-mobile-appsync-events-starter-ios

Name: aws-mobile-appsync-events-starter-ios

Owner: AWS Samples

Description: GraphQL starter application with Realtime and Offline functionality using AWS AppSync

Created: 2017-10-25 21:59:43.0

Updated: 2018-01-17 02:32:57.0

Pushed: 2018-01-15 18:56:37.0

Homepage: https://aws.amazon.com/appsync/

Size: 227

Language: Swift

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Introduction

This is a Starter application for using the Sample app in the AWS AppSync console when building your GraphQL API. The Sample app creates a GraphQL schema and provisions Amazon DynamoDB resources, then connects them appropriately with Resolvers. The application demonstrates GraphQL Mutations, Queries and Subscriptions using AWS AppSync. You can use this for learning purposes or adapt either the application or the GraphQL Schema to meet your needs.

EventDetails

Features
AWS Setup
  1. Navigate to the AWS AppSync console using the URL: http://console.aws.amazon.com/appsync/home

  2. Click on Create API and select the Sample Schema option. Enter a API name of your choice. Click Create.

iOS Setup

Clone this repository:

clone https://github.com/aws-samples/aws-mobile-appsync-events-starter-ios.git

From the homepage of your GraphQL API (you can click the name you entered in the left hand navigation) wait until the progress bar at the top has completed deploying your resources.

On this same page, select iOS at the bottom to download your AppSync.json configuration file. In the sample app which you just downloaded, copy the API URL and API Key from this JSON file and paste them into the Constants.swift file.

To setup the dependencies in the app, navigate to the project you just cloned from a terminal and run:

install

Now open EventsApp.xcworkspace.

Application Walkthrough
EventsAPI.swift

This will generate an updated EventssAPI.swift file with additional operations.

EventListViewController (Query)
EventDetailsViewController (Mutation, Query, Subscription)
AddEventViewController (Mutation)

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.