Skip to content
This repository has been archived by the owner on Mar 18, 2020. It is now read-only.

Latest commit

 

History

History
115 lines (98 loc) · 3.09 KB

README.md

File metadata and controls

115 lines (98 loc) · 3.09 KB

[UNMAINTAINED]

Nest

Project based on nest-js-sequelize-jwt and use

How it works

  • To run lint and fix npm run lint
  • To run tests suite npm run test
  • Start the server npm start
  • To run up/down migration npm run migrate {up/down}

Configuration

To configure put all config file in the ./src/config/*. To use the env variable, remove .demo from .env.demo.

Request example

To get users

POST http://localhost:3000/graphql with the following body :

{
    "query": "{ getUsers(filter: { search: \"toto\" }) { id, firstName, lastName, email }}"
}

Where getUsers is a Query type which is difine in the ./modules/graphql/config/schema.ts and implemented in ./modules/graphql/config/resolvers.ts

And the result of this request is :

{
    "data": {
        "getUsers": [
            {
                "id": "1",
                "firstName": "firstName",
                "lastName": "lastName",
                "email": "toto@email.fr"
            }
        ]
    }
}

To get user with cars

POST http://localhost:3000/graphql with the following body :