Skip to content

ptessier/graphql-server

Repository files navigation

chunk

Getting started

# clone project
git clone [email protected]:ptessier/chunk.git
# install the dependencies
yarn install
# deploy the containers
docker-compose up -d
# start the server
yarn start

Prisma

# database url
postgresql://USER:PASSWORD@HOST:PORT/DATABASE

Introspection

Update the database and the related files in database/init folder,

# update schema.prisma from the database
yarn prisma introspect
# update the prisma client
yarn prisma generate

source

Migration

Update schema.prisma file,

# create a migration
prisma migrate save --experimental
# update the database with the migration
prisma migrate up --experimental

Finally, update the schema in database/init.

source

Docker

# start the application
docker-compose up -d

# list application
docker-compose ps

# remove the application
docker-compose rm -s -f

# dump the schema
docker exec graphql-server_pg_1 pg_dump -U postgres --no-privileges --schema-only --no-owner prisma > database/init/schema.sql

# dump the data
docker exec graphql-server_pg_1 pg_dump -U postgres --data-only --no-owner prisma > database/init/data.sql

# delete the database data
rm -rf database/data

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published