Skip to content
This repository has been archived by the owner on Sep 11, 2022. It is now read-only.

kazekyo/nestjs-graphql-relay

Repository files navigation

nestjs-graphql-relay

Example backend server for relay :

  • NestJS 7
  • Relay Style
    • Identification, Connections
    • using relay-js
  • Code first approach
  • TypeORM

Running the app

# start mysql server
$ docker-compose up

# development
$ npm run start

# watch mode
$ npm run start:dev

# run if initial data needed
$ npx ts-node ./src/_script/seed.ts

# drop all data
$ npm run typeorm schema:drop

Go to http://localhost:3000/graphql

example query

query {
  getUsers {
    id
    name
    catsConnection(where: {name: "Leo"}) {
      aggregate {
        count
      }
      edges {
        node {
          id
          name
          age
          user {
            id
            name
          }
        }
      }
    }
  }
  getCats {
    id
    name
  }
}

About

Example of a backend server for Relay(GraphQL client) using NestJs.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published