Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/jyotindersingh/typegraphql-reference

Reference repository for building GraphQL API with Typescript
https://github.com/jyotindersingh/typegraphql-reference

Last synced: about 6 hours ago
JSON representation

Reference repository for building GraphQL API with Typescript

Awesome Lists containing this project

README

        

# TypeGraphQL Boilerplate [in progress]

I'm a noob so I keep such repos on my GitHub to refer back to in the future (2 weeks from now), when I've forgotten how this shit works.

## How this works

- We use TypeGraphQL to make it easier to use TS in GraphQL
- We use Apollo Server to setup a GraphQL server, using Express
- We use TypeORM as the ORM of choice, which makes using Postgresql easier
- We use bcrypt for hashing passwords (not the best choice, but is easy to setup - you probably want to use a stronger hashing library in production)
- we use sessions to keep user logged in, we use the express-session library for this
- connect-redis provides Redis session storage for Express
- ioredis is the redis client that we're going to use
- we also install cors so that we don't face problems with cookies
- We send confirmation emails to users on sign up to confirm their accounts, which contain a link that the user needs to click to be able to login to their account
- We allow the user to reset their password by clicking on a link sent to their email