https://github.com/wednesday-solutions/node-express-graphql-template
An enterprise Express GraphQL template application built using nodejs showcasing - Testing Strategy, DB migrations and seeding, integration with an ORM, containerization using Docker, GraphQL Interface, support for GraphQL relay, integration with graphql-sequelize, support for aggregation queries, PostgreSQL
https://github.com/wednesday-solutions/node-express-graphql-template
docker express graphql graphql-api-template graphql-sequelize join-monster node-graphql-template node-postgres-graphql-template node-postgres-template node-template nodejs postgres relay
Last synced: 8 months ago
JSON representation
An enterprise Express GraphQL template application built using nodejs showcasing - Testing Strategy, DB migrations and seeding, integration with an ORM, containerization using Docker, GraphQL Interface, support for GraphQL relay, integration with graphql-sequelize, support for aggregation queries, PostgreSQL
- Host: GitHub
- URL: https://github.com/wednesday-solutions/node-express-graphql-template
- Owner: wednesday-solutions
- License: mit
- Created: 2020-05-21T19:33:09.000Z (almost 6 years ago)
- Default Branch: develop
- Last Pushed: 2024-07-03T11:56:00.000Z (over 1 year ago)
- Last Synced: 2025-04-13T21:13:12.977Z (11 months ago)
- Topics: docker, express, graphql, graphql-api-template, graphql-sequelize, join-monster, node-graphql-template, node-postgres-graphql-template, node-postgres-template, node-template, nodejs, postgres, relay
- Language: JavaScript
- Homepage: https://wednesday.is/building-products/?utm_source=github&utm_medium=node-exress-graphql-template
- Size: 3.12 MB
- Stars: 35
- Watchers: 3
- Forks: 30
- Open Issues: 45
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

Node Express GraphQL Template
An enterprise Express GraphQL template application built using nodejs showcasing - Testing Strategy, DB migrations and seeding, integration with an ORM, containerization using Docker, GraphQL Interface, support for GraphQL relay, integration with graphql-sequelize, support for aggregation queries, PostgreSQL
---
Expert teams of digital product strategists, developers, and designers.
---
We’re always looking for people who value their work, so come and join us. We are hiring!

##
Built using Negt CLI
## A relay compliant server built using
- Node
- Express
- Postgres
- GraphQL
- Docker
## Out of the box support for
- Containerization using Docker
- Multi layered docker image support
- CI pipeline that runs on every pull request
- Simply add in the github secrets and uncomment the [cd.yml](.github/workflows/cd.yml) to deploy to ECS
- GraphQL relay compliant server
- RBAC auth middleware
- Out of the box support to run database migrations and seeders using sequelize
- Multi environment support using the dotenv library
- precommit hooks to run tests
- docker-compose to run the application without installing additional db, and cache infrastructure
- Autogenerate queries and mutations based on GQL models
- Support for circuit breaking has been added using [opossum](https://github.com/nodeshift/opossum)
- Support for sending slack alerts on desired errors has been added using [slack-notify](https://www.npmjs.com/package/slack-notify)
- Support for caching added with [redis](https://redis.io/)
- Support for custom mutations has been added along with support for updating only specific fields
- Support for adding a job and queuing it has been added using [bull](https://github.com/OptimalBits/bull)
- GraphQl subscriptions have been added using [apollo-server](https://www.npmjs.com/package/apollo-server-express) & [graphql-redis-subscriptions](https://www.npmjs.com/package/graphql-redis-subscriptions)
- Support for caching of aggregate data added using Redis
## Dependencies
### graphql-sequelize
Please go through the [documentation](https://github.com/mickhansen/graphql-sequelize) to understand the control flow.
Relay support has been added by following [this](https://github.com/mickhansen/graphql-sequelize/blob/master/docs/relay.md) documentation
## Setup
### Setting up database (postgres)
- Requirement [postgresql](https://www.postgresql.org/)
Steps to set up database with `username` and `role` using terminal
- Enter postgres terminal `psql postgres`
- Create new database `CREATE DATABASE reporting_dashboard_dev;`
- Create a new role with password `CREATE ROLE reporting_dashboard_role WITH LOGIN PASSWORD 'reportingdashboard123';`
### Setup and run locally using
```
./scripts/setup-local.sh
```
### Build and run docker container locally
```
docker-compose down
docker-compose build
docker-compose up
```
### Develop locally
```
yarn start:local
```
### Start dev server
```
yarn dev
```
### Start prod server
```
yarn prod
```
### Build the application
```
yarn build
```