This is a simple GraphQL server for demonstration at HackSMU.
This project uses docker. To run the project, run these commands.
yarn docker:setupyarn docker:start
bin- quality of life scripts for docker commandsdb- db access repository layergraphql- graphql schema and resolver definitionsknex- migrations and seeds
This project uses a few key libraries that you should know about.
- Apollo - A GraphQL framework for Node
- Knex - A sql query build that handles querying the database, migrations, and seeds
We use Knex for migrations and seeds.
To create a migration:
yarn knex migrate:make <name_of_migration>
To run migrations:
yarn knex migrate:latest
To roll back the DB:
yarn knex migrate:rollback
To create a new seed:
yarn knex seed:make <name_of_seed>
To run seeds:
yarn knex seed:run