Skip to content

Latest commit

 

History

History
65 lines (47 loc) · 1.42 KB

app-sync.md

File metadata and controls

65 lines (47 loc) · 1.42 KB

AppSync

  • Serverless Data-Integration Layer
  • Typed-API via GraphQL
  • Supports multiple GraphQL-APIs
  • Logging and Tracing via CloudWatch
  • Supports different Authentication types
  • Supports different DataSources
    • Lambda
    • HTTP
    • DynamoDB
  • Bind Queries, Mutation, Subscription Resolvers to Schema
  • Supports different Client-Platforms (iOS, Android, React, React-Native, Angular)
  • Some of the SDKs supports Offline-Data-Handling and Optimistic-UI-Updates

GraphQL-API Server

See GraphQL-API via Infrastructure as Code with AWS-CDK

GraphQL-API Client

AppSync Client

React

Setup

  1. yarn add aws-appsync react react-dom react-apollo
  2. yarn add parcel
  3. touch index.html
  4. touch index.jsx

index.html

React-Apollo

index.jsx

import React from 'react'
import { render } from 'react-dom'
import Client from 'aws-appsync'
import { ApolloProvider } from 'react-apollo'
import App from './App'

const client = new Client({
  url: global.graphqlEndpoint,
  region: global.region,
  auth: {
    type: global.authenticationType,
    apiKey: global.apiKey,
  }
})

render(<ApolloProvider client={client}><App /></ApolloProvider>, document.getElementById('app'))

Resources