Giter Site home page Giter Site logo

andrewjbateman / angular-appsync-sdk Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 3.01 MB

:clipboard: Angular 8 app using the sdk version of AWS appsync

JavaScript 9.75% TypeScript 86.00% HTML 3.61% CSS 0.64%
angular8 aws-appsync aws-sdk html5 css3 scss-styles repair

angular-appsync-sdk's Introduction

โšก Angular GraphQL AppSync

  • App using Angular to create a todo list. AWS amplify and Appsync are used to communicate with a todo database, hosted in a GraphQL serverless AWS backend.
  • The home screen displays an AWS authorization page. Once authorised the user can create todos that are listed in the UI.
  • Amplify Appsync SDK is used to create mutations etc. Offline support is added so any todo items added while off line are shown on the UI then are added to the backend as part of the ngOnit lifecycle method.
  • Upgrade to Angular 10 etc. does not work - consider replaceing with another AWS amplify and Appsync app

*** Note: to open web links in a new window use: ctrl+click on link**

๐Ÿ“„ Table of contents

๐Ÿ“š General info

  • AWS Amplify makes it easy to create, configure, and implement scalable mobile and web apps powered by AWS. It provides a framework to integrate the backend with iOS, Android, Web, and React Native frontends. It allows you to select the capabilities needed, e.g. authorization, analytics or offline data sync.

  • AWS Appsync SDK enables integration of the app with the AWS AppSync service. The SDK supports multiple authorization models, handles subscription handshake protocols for real-time updates to data, and has built-in capabilities for offline support that makes it easy to integrate.

๐Ÿ“ท Screenshots

Example screenshot. Example screenshot

๐Ÿ“ถ Technologies

๐Ÿ’พ Setup

  • Run ng serve for a dev server. Navigate to http://localhost:4200/. The app automatically reloads if you change any of the source files.

๐Ÿ’ป Code Examples

  • todo.component.ts extract from ngOnInit showing how any todos added while offline are added to the backend database as part of the ngOnInit lifecycle method.
  ngOnInit() {
    this.appsync.funchc().then(client => {
      const observable = client.watchQuery({
        query: gql(listTodos),
        fetchPolicy: 'cache-and-network'
      });

      observable.subscribe(({data}) => {
        this.allTodos = data.listTodos.items;
      });
    });
  }

Features

  • The AWS Amplify push process creates a ./src/graphql folder structure and generates a new api in the AWS Appsync Console.

Status & To-Do List

  • Status: Working: Very basic aws todo database that stores data in a cache if offline.

  • To-Do: Explore AWS Amplify further.

Inspiration

Contact

Repo created by ABateman - feel free to contact me!

angular-appsync-sdk's People

Contributors

andrewjbateman avatar dependabot[bot] avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.