The graphql api for gitfame
Name | Description |
---|---|
graphq-yoga | with graphql-tools as its core, it provides a better way of building graphql aplications |
prisma | db as a graphql api, this project uses the postgres connector |
apollo engine | Tracking and analytics for the gql api |
prettier | pre-commit code formating |
.
├── app
│ ├── actions
| ├── database # database files
│ │ ├── api.graphql # db gql api generated by prisma (DO NOT TOUCH)
│ │ ├── schema.graphql # db schema defined via gql type system
│ │ └── ...
| ├── models # app gql api models
| ├── resolvers
│ │ ├── query # query field resolvers
│ │ ├── mutation # mutation field resolvers
│ │ ├── subscription # subscription field resolvers
│ │ └── ...
| ├── index.js # entry point
| ├── schema.grphql # app gql api schema
│ └── ...
├── ci # deployment and testing scripts
├── env # dev and prod env files
└── ...
Create env/dev.env
and env/prod.env
for development and production respectively. Read this to generate github token.
NODE_ENV=development
API_BASE=http://localhost:4000/
DB_USER= #postgres user
DB_SECRET= #postgres pass
DB_API_NAME= #cluster name
DB_API_STAGE= #cluster stage
DB_API_SECRET= #secret to sign and verify JWT token for prisma api
APOLLO_ENGINE_KEY=
SENTRY_KEY=
GITHUB_TOKEN= # github personal access token
# Install Prisma and Postgres images
DB_USER=<pgUser> DB_SECRET=<pgPass> docker-compose up -d
# Install dependencies
yarn
# Deploy Prisma
yarn prisma-dev
# Start dev server on localhost:4000
yarn dev
Frontend repo : https://github.com/hereisnaman/gitfame