Skip to content

Projeto feito para praticar o uso das tecnologia NestJS, GraphQL, TypeORM, TypeScript e Postgres

License

Notifications You must be signed in to change notification settings

AmauriOliveira/NestJS-GraphQL-TypeORM

Repository files navigation

Nest Logo

Nest APi TypeOrm GraphQL Demo

Um Api feita para aprender e praticar diversos conceitos

https://www.youtube.com/playlist?list=PLDqnSpzNKDvlmRnr_K9PoQBqUSkVU42J1

GitHub last commit license GitHub repo size

🔭 Visão geral

🏠 Homepage Veja outros projetos

💻 Tecnologias

NodejsBadge NestJS Badge TypeScript Badge Docker Badge Git Badge GitHub Badge VSCode Badge Jest Badge PostgreSQL Badge

Docker composer

# copile and up
$ docker-compose up --build
# up
$ docker-compose up
#down
$ docker-compose down

Installation

$ npm install

Running the app

# development
$ npm run start

# watch mode
$ npm run start:dev

# production mode
$ npm run start:prod

Test

# unit tests
$ npm run test

# e2e tests
$ npm run test:e2e

# test coverage
$ npm run test:cov

# test verbose
$ npm run test:verb

GraphQl

Exemplo de como montar as query

Query

# body
query{
  users{
    id
    name
    email
  }
}

#body
query{
  userByEmail(email:"[email protected]"){
    id
    name
    email
  }
}

#header
{"Authorization":"Bearer ...." }
#body
query {
  user(id: "1") {
    name
    email
  }
}

Mutation

# body
mutation {
  createUser(
    data: { name: "jose", email: "[email protected]", password: "123456" }
  ) {
    id
    name
    email
  }
}

# body
mutation {
  login(data: { email: "[email protected]", password: "123456" }){
    user{
      id
      name
      email
    }
    token
  }
}
# body
mutation{
  updateUser(id:"1", data:{ name: "José Oliveira", email:"[email protected]"}){
    id
    name
    email
  }
}
# body
mutation{
  deleteUser(id:"2")
}

🌟 Contributing

Contributions, issues and feature requests are welcome!

  • ⭐️ Star the project
  • 🐛 Find and report issues
  • 📥 Submit PRs to help solve issues or add features

Feel free to check issues page. You can also take a look at the contributing guide.

🙇 Author

Amauri Oliveira

📚 License

Copyright © 2020 Amauri Oliveira This project is MIT licensed.


About

Projeto feito para praticar o uso das tecnologia NestJS, GraphQL, TypeORM, TypeScript e Postgres

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published