This is a Starter React 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
GraphQL Queries
GraphQL Subscriptions
Authorization
Navigate to the AWS AppSync console using the URL: http://console.aws.amazon.com/appsync/home
Click on Create API
and select the Event App
under the sample project
in the bottom pane, and select Start
. Enter a API name of your choice. Click Create
.
First, clone this repo:
git clone https://github.com/aws-samples/aws-mobile-appsync-events-starter-react.git
cd ./aws-mobile-appsync-events-starter-react
Wait until the progress bar at the top has completed deploying your resources. Then from the integration page of your GraphQL API (you can click the name you entered in the left hand navigation).
On this same page, select JavaScript
at the bottom to download your aws-exports.js
configuration file by clicking the Download Config button. Replace the aws-exports.js
file in the root of your app with the file you just downloaded.
Install dependencies
npm install
Start the application:
npm run start
BrowserRouter
from React Router.AWSAppSyncClient
using an API Key. This can be confugured to use Amazon Cognito Identity or Amazon Cognito User Pools as well../GraphQL/QueryAllEvents.js
./GraphQL/MutationDeleteEvent.js
./GraphQL/MutationCreateEvent.js
ViewEvent
gets all the comments for a specific event when page loads with a GraphQL query defined in ./GraphQL/QueryGetEvent
EventComments
sets up a GraphQL subscription using ./GraphQL/SubscriptionEventComments
to display any new comments on an event in realtime.ChatQL: An AWS AppSync Chat Starter App written in Angular Quicklinks Introduction Features Getting Started Prerequisites Backend setup Application Walkthrough AWS Pinpoint Analytics Building, Deployi
AWS AppSync JavaScript SDK This SDK provides Apollo links that can be used with the Apollo JavaScript client version 3. Please log questions for this client SDK in this repo and questions for the AppS
AWS Mobile React Native Starter App - Serverless Pet Tracker This sample application has been archived in favor of Amplify JS Samples. While the archived repository will still work, please go +1 this
AWS AppSync AWS AppSync is a managed GraphQL service for application data and a back-end for mobile, web, and enterprise applications. Awesome AWS AppSync curates the best AWS AppSync, tools, tutorial
我计划使用AWS Appsync迁移lambda函数中的graphQLendpoint,该函数由通过API网关的POST触发。我研究AppSync主要是因为订阅,我无法使用Lambda函数创建订阅。 我的身份验证机制基于Auth0,使用无密码,我的授权机制基于DynamoDB中几个表的数据,并嵌入到graphQL解析器中,这是Facebook和Apollo推荐的。 更重要的是,它基于请求的每一部分
Amplify是否支持此处概述的脱机功能:https://docs.aws.amazon.com/appsync/latest/devguide/building-a-client-app-react.html#offline-背景 我应该这样设置吗?https://aws.github.io/aws-amplify/media/api_guide#configuration-for-graphq