Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/gustavovalle23/user-microservice-typescript

This is a microservice that represents the users of the application
https://github.com/gustavovalle23/user-microservice-typescript

clean-architecture graphql microservice nestjs nodejs typeorm typescript

Last synced: about 1 month ago
JSON representation

This is a microservice that represents the users of the application

Awesome Lists containing this project

README

        

# User MicroService
> This is a microservice that represents the users of the application

## Features and Technologies
> This project uses Node.js v18.14.0, NestJS (with Express), Mongoose, MongoDB and GraphQL

- [x] Create user
- [x] Read/Find all users registered
- [x] Read/Find all user by id
- [ ] Update user
- [ ] Delete user
- [x] Use docker and docker-compose
- [x] Configure MongoDB
- [x] Use task file

## Build Setup Docker
```console
user@project:~$ task
```

## Stop Docker
```console
user@project:~$ task stop
```

## enter n container server (GraphiQL is started at http://127.0.0.1:4000/graphql)
task app

# run tests
```console
user@project:~$ yarn test:e2e
user@project:~$ yarn test:cov
```

## Query Examples

```graphql
query FindAllUsers {
allUsers {
id
isActive
name
email
cpf
birthDate
}
}
```

```graphql
query FindUserById($findUserByIdId: String!) {
findUserById(id: $findUserByIdId) {
user {
id
isActive
name
email
cpf
birthDate
}
}
}
```

```graphql
mutation CreateUser($user: CreateUserInput!) {
createUser(user: $user) {
user {
id
isActive
name
email
cpf
birthDate
}
}
}
```