Skip to content

Graphql Server boilerplate built with TypeORM (vanilla javascript)

License

Notifications You must be signed in to change notification settings

varsnotwars/graphql-server-boilerplate

Repository files navigation

WORK IN PROGRESS

Graphql Server Boilerplate

Build Status Code Coverage Code Quality License
Build Status Code Coverage Code Quality License

Features:

  • Signup
  • Login
  • Logout (from single client or all clients)
  • User confirmation
  • Forgot password
  • Sessions with cookies
  • Authentication middleware
  • Email sending (user confirmation, password resets)

Uses:

  • typeorm (vanilla javascript, no typescript)
  • apollo server express
  • mysql integration
  • nodemailer integration

TODO:

  • move rate limiting settings to config
  • move orm connection to context
  • close session store cleanly ?
  • cleanup the test file names and folder structures
  • general code cleanup
  • put expect res.errors toBeFalsy checks before all res.data.resolverName checks
  • rework tests so they can run in parallel
  • fix hanging tests requiring the use of --forceExit

Note

  • Tests must be run sequentially --runInBand flag is passed into jest, see package.json
  • NODE_ENV uses windows syntax of SET
  • Must explicitly provide a column type to typeorm
  • MYSQL 8 not supported by mysql dependency, run the following command to fix ER_NOT_SUPPORTED_AUTH_MODE error: ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password'