Project based on nest-js-sequelize-jwt and use
- 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}
To configure put all config file in the ./src/config/*
.
To use the env variable, remove .demo
from .env.demo
.
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"
}
]
}
}
POST http://localhost:3000/graphql
with the following body :