Name: aws-mobile-appsync-events-starter-react-native
Owner: AWS Samples
Description: GraphQL starter application with Realtime and Offline functionality using AWS AppSync
Created: 2017-10-25 20:27:01.0
Updated: 2018-01-15 13:03:33.0
Pushed: 2018-01-11 01:00:41.0
Homepage: https://aws.amazon.com/appsync/
Size: 384
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
This is a Starter React Native 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.
GraphQL Mutations
Create new events
Create comments on existing events
GraphQL Queries
Get all events (w/ pagination support)
Get an event by Id
GraphQL Subscriptions
Real time updates for comments on an event
Authorization
The app uses API Key as the authoriation mechanism
Navigate to the AWS AppSync console using the URL: http://console.aws.amazon.com/appsync/home
Click on Create API
and select the Sample Schema
option. Enter a API name of your choice. Click Create
.
First, clone this repo:
clone https://github.com/aws-samples/aws-mobile-appsync-events-starter-react-native.git
/aws-mobile-appsync-events-starter-react-native
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 React Native
at the bottom to download your AppSync.js
configuration file into your project directory. Rename it to aws-exports.js
.
Start the application:
install
run ios #run-android
StackNavigator
.AWSAppSyncClient
using an API Key. This can be confugured to use Amazon Cognito Identity or Amazon Cognito User Pools as well../queries/ListEvents.js
with a ScrollView
./queries/DeleteEvent.js
./queries/CreateEvent.js
CommentOnEvent.js
and GetEvent.js
) for you to enhance the sample.