Giter VIP home page Giter VIP logo

graphql-api's Introduction

  • git clone https://github.com/abdullahkhan-z/test-s
  • cd test-s
  • For local install npm install
  • Duplicate .env.local and rename it to .env. Only Prisma depends on it
  • In case one intends to use his/her database credentials then following steps are necessary.
  • If prisma cli is not already installed then install that globally, run prisma db push. This will push local schema to remote database.
  • Use GraphQL to add a dummy User with username abc and password abc as integration tests assume the use is already registered
  • To do that. Follow the following steps
  • Run in dev mode npm run start:dev
  • Open GraphQL playground at localhost:3000
  • Run signup mutation mutation{ signUp(username:"abc", password:"abc"){ response } }
  • Run tests npm run test
  • Build for docker sudo docker compose build
  • sudo docker compose up Note: By, default, this runs in production mode with redis enabled, configurations can be changed from environment variables in docker-compose.yaml file. Development mode does not have redis enabled.
  • Run tests sudo docker compose run api npm run test.
  • Implementation through graphql, all mutations are protected apart from signup.
  • One may find details in about api in src/graphql/
  • Prisma is being used as ORM, along with apollo server and nexus
  • jest is used for testing. Integration tests are found in test/integration-tests.

Kubernetes Deployment Rountine

  • push built docker image to public repo
  • in kubernetes.yaml change source image of main-app-deployment deployment scheme
  • Configuration was tested on minikube

graphql-api's People

Contributors

abdullahkhan-z avatar

Watchers

 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.