-
Download & Install Dependencies
# Install dependencies $ yarn $ createdb name_of_your_db && createdb name_of_your_db_test
Then search and replace name_of_your_db and name_of_your_db_test with your db name
$ yarn run migrate:up $ yarn run migrate:up:test
$ yarn start
yarn test
create migration:
yarn run migrate create <name> --sql-file
Sometimes we change current migrations instead of adding new ones. In that case:
yarn resetdb
db:types
https://github.com/rmp135/sql-ts
Flow: schemas -> queries/mutations -> dataSources -> reducers -> queries
This is where we have our graphql schema types layed out. We also define entry points for the query resolvers and mutations
This is where we put our query resolvers. It should use StoreDataSources to manipulate the database, and DataSources to call external services
This is where we put our mutations. It should use StoreDataSources to manipulate the database, and DataSources to call external services
This is where we manipulate the database
This is where we call external services
This is where we serialize data from the StoreDataSources