Skip to content
This repository has been archived by the owner on Aug 4, 2020. It is now read-only.

Fullchee/values-graphql-yoga-json

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

74 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Links

Tech

  • powered by graphql-yoga
    • Node.js & Express
      • Resolvers programmed in src/resolvers.js
        • data: plain JS objects
  • data reset function
    • password protected (stored in Heroku config)
      • (git-crypt didn't work well with Heroku)
    • passwords encrypted with bcrypt
  • Easy script to update links from the production server
    • yarn updateLinks

Install

Prerequisites

  • yarn
  • Node.js
yarn install
yarn start

Lessons learned

  • Encrypting the reset password
    • used bcrypt and a Heroku config variable
    • I couldn't figure out how to use git-crypt with Heroku
  • keywords generation
    • keywords.txt -> JSON
    • txt: easy to add/remove words
    • I initially put it in client
    • logically made sense to put it in the back-end, make it available via /keywords
  • updateLink
    • mutation params can only be simple (no Link param)
      • I used a stringified object => way easier to create queries

TODOs

  • Automated tests with Newman
    • automate tests for adding all the user behaviours
    • stub the backend?
    • automated tests with the real backend
  • add Anna Akana and In a Nutshell to values
  • set the default "This is water" to prepopulate
  • handle bugs