Skip to content

jakelowen/typescript-graphql-boilerplate-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

93 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Inspired by Ben Awad's https://github.com/benawad/graphql-ts-server-boilerplate

Difference's from Awad's version

  • Uses knex and objectionjs instead of typeorm.
  • DB schema types exported by schemats
  • Uses JWT tokens instead of cookies. I found tokens much easier to validate when came to securing the websocket / subscriptions connections. JWT tokens are versioned to automatically invalidate "stale" tokens.
  • Tests use apollo client directly instead of fetch. This allows for tests of authenticated subscriptions via websocket connections.

Enhancements

  • 8/8/18 - added robust team permissions system. Permissions table defines possible permissions that might exist ("ADMIN", "SENDMESSAGES", etc). Team admins can grant or remove any allowed permission to any user via mutations. A Team's users and a user's teams can be queried. When non-team admins query for team users, the user email addresses are obfuscated.
  • 8/9/18 - heroku deploy ready

To deploy on heroku

Create an app: heroku create Provision redis: heroku addons:create heroku-redis:hobby-dev Privision postgres: heroku addons:create heroku-postgresql:hobby-dev Deploy: git push heroku master Migrate Database: heroku run knex migrate:latest --knexfile dist/knexfile.js

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages