In this article you will look at a NodeJS app coming with an integration of GraphQL and Sequelize connected to PostgreSQL to bridge normalized, relational data (in 1-n, m-n cardinalities) to document-based representations of the data. I’m going to provide example GraphQL READ-only queries and show how they get translated into effective SQL statements through the Object Relational Mapper Sequelize.
For a quick start, this article provides a working example on this GH repo.
yarn
to install the node dependenciesNODE_ENV=development
PORT=9000
DB_HOST=127.0.0.1
DB_PORT=5432
DB_DATABASE=its-my-database
DB_USERNAME=its-me
DB_PASSWORD=its-my-password
DB_SCHEMA=its-my-schema
DB_DIALECT=postgres
#nodejs #sequelize #graphql