/catalogue-api

GraphQL API project to manage a catalogue of any kind of product or service following the Nestjs GraphQL schema first approach.

Primary LanguageTypeScript

Catalogue API

Description

Hi 😀! This is a GraphQL API project to manage a catalogue of any kind of product or service. My intention is to add new functionalities bit by bit in my free time 🤓.

Note: the project is following the Nestjs GraphQL schema first approach.

Technologies

Nest a progressive Node.js framework for building efficient, reliable and scalable server-side applications. Prisma Next-generation Node.js and TypeScript ORM. GraphQL GraphQL is a query language for APIs and a runtime for fulfilling those queries with your existing data. PostgreSQL The World's Most Advanced Open Source Relational Database.

Docker

# start the DB
$ cd ./docker
$ docker-compose up

Installation

# install the node modules
$ cd ./project
$ yarn

Running the app

# development
$ yarn start

# watch mode
$ yarn start:dev

# production mode
$ yarn start:prod

Test

# unit tests
$ yarn test

# e2e tests
$ yarn test:e2e

# test coverage
$ yarn test:cov

Useful commands

Prisma

# generate and apply a migration
$ yarn prisma migrate dev --name

# start prisma studio
$ yarn prisma studio

NestJs

# generate resource
$ nest generate resource "resource-name"
# then select GraphQl (schema first)

Stay in touch