This is the corresponding repository to article on how to set up AppSync with offline support and react hooks.
git clone https://github.com/willsamu/appsync-offline-mutations.git && cd appsync-offline-mutations
npm install -g @aws-amplify/cli expo-cli
Configure global amplify settings with amplify configure
In the appsync-offline-mutations
directory, initialize the amplify project:
amplify init
Add a Cognito User Pool with default settings:
amplify add auth
Attach a GraphQL API (default settings / todo schema) to it:
amplify add api
Finally run
amplify push
Install dependencies using npm install
or yarn install
.
Start the the project on an emulator or on your mobile device using the Expo app (IOS / Android):
expo start