Coder Social home page Coder Social logo

chamarasanjeewa / serverless-graphql Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dasithkuruppu/serverless-graphql

0.0 1.0 0.0 595 KB

🌩️ Boilerplate for typescript/nodejs on AWS using serverless yml templates with graphQL as the API backed by dynamod & elastic search

Home Page: https://dasithkuruppu.github.io/Serverless-GraphQL/

License: Apache License 2.0

TypeScript 71.68% HTML 1.02% JavaScript 27.30%

serverless-graphql's Introduction

🌩️ Serverless Nodejs/GraphQL Boilerplate

(IaC using YML/Serverless, devOps, Scalability & other πŸ¦„ magical stuff)

CircleCI tested with jest jest forthebadge forthebadge

Please go to Gitlab Repo or use gitlab if you want to use free gitlab CI/CD instead of circleCI

Read more on :

Features.


  1. ⚑ Serverless YML templates(Infrastucture As Code- IAC) that provide and provision dynamic/scalable resources like DynamoDb,S3,elastic search, lambda functions etc with a single command.
  2. πŸ“œ Support for Typescript.
  3. 🎭 An attempt at unit testablity and test coverage via Jest, this would be focused more heavily on later updates.
  4. πŸŒ€ Attempts to focus on a simple development structure / flow.
  5. πŸ‹οΈβ€β™‚οΈ Support for any amount of environments (Dev,Test,Production etc..) replications via Cloud formation templates.
  6. πŸ•ΈοΈGraphQL api exposed via a single endpoint with the posiblilty to scale via step functions or otherwise in future.
  7. βœ”οΈ CI/CD for all 3 environments (dev,test,production) via Gitlab CI/CD
  8. πŸ‹ Docker file / compose for running dynamodb offline on a docker container.

Architecture

Architecture diagram

How to Install & Pre-requisites


Clone project into your local folder.... & then navigate to project on terminal or Shell

npm install -g serverless

serverless config credentials --provider aws --key $AWS_ACCESS_KEY_ID --secret $AWS_SECRET_ACCESS_KEY

Note that the $AWS_ACCESS_KEY_ID and $AWS_SECRET_ACCESS_KEY here needs to be replaced by credentials given to you by project owner or you may create your own AWS account and IAM role / credentials for programatic access Click here for more info !!!

Install GraphQL Playground optional for easy querying

Getting started


npm install

npm install -g graphql-cli

npm run deploy-dev
npm start

To run it locally

Using / Playing around with it...


Initially make sure you have completed steps in both Install & Pre-requisites and in Getting started

npm run deploy-dev

Copy URL to the lambda function that is output onto the terminal once above command is run Terminal

Then Open GraphQL Playground and Select "URL EndPoint" and paste the Copied URL there GraphQL OpenProject

Then Run

query {
  listEvents {
    id
    name
  }
}

To see if the GraphQL query works as inteded either by returning empty list or list of "events" GraphQLPlayground

Read more on graphQL to learn Queries / Mutations to try out more queries againt the API

serverless-graphql's People

Contributors

dasithkuruppu avatar dependabot[bot] avatar

Watchers

James Cloos 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.