Skip to content

elie-tdev/brand

Repository files navigation

1 Brand GraphQL Gateway Server

Description

Nest

Nest GraphQL

PostgreSQL 11, Docker, Docker Compose, & Make

Local development

Initial Setup

$ make
$ MIGRATION_PATH=<your_path_to>/graphql-gateway make migrate-init 
$ MIGRATION_PATH=<your_path_to>/graphql-gateway make migrate-up

Continued development

Starting the container & app

$ make compose-up

Stopping the container & app

$ make compose-down

Running migrations

$ MIGRATION_PATH=<your_path_to>/graphql-gateway make migrate-up

Test

$ make test

Database migrations

Database migrations for this app use golang-migrate/migrate command-line utility. To simply run existing migration you do not need to download the dependancy. We are running the migration commands via a docker container. However if you want to generate the files you can download/install it locally following these instructions: https://github.com/golang-migrate/migrate/tree/master/cli and running the following command: migrate -ext sql -dir sql/migrations -seq -digits 4 <name_of_migration>

Read more about migration best practices here Read more about cli commands here

MIgration commands in Makefile

Migrate the initial setup. Requires RDS admin credentials.

$ MIGRATION_PATH=<your_path_to>/graphql-gateway make migrate-init

Migrate changes up

$ MIGRATION_PATH=<your_path_to>/graphql-gateway make migrate-up

Migate the changes down

make migrate-down

Force migate starting at an existing version

make migrate-force -v=<migration_version_number>

About

node.js and graphql with typescript

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published