ryskit / graphql-coffee

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GraphQL-Coffee

Installation

$ yarn install

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

Prisma

yarn prisma migrate dev --name [file_name]

ref: https://www.prisma.io/docs/reference/api-reference/command-reference

Generate GraphQL Code

Please modify coffee.graphql or create new [***.graphql] If you define GraphQL Schema.

you want to generate TS code from GraphQL Schema, run the below command.

$ yarn ts-node src/generate-types

Memo

nest new graphql-coffee
yarn add @nestjs/graphql @nestjs/apollo graphql apollo-server-express
yarn add ts-morph
yarn ts-node src/generate-types
nest g module coffees
nest g resolver coffees
nest g s coffees

yarn add --dev prisma
yarn add @prisma/client
yarn add @nestjs/config
yarn add class-validator class-transformer
yarn add graphql-subscriptions
yarn add dataloader

About


Languages

Language:TypeScript 92.8%Language:JavaScript 4.7%Language:Shell 2.5%