https://github.com/andrebraghini/tasks-api
https://github.com/andrebraghini/tasks-api
Last synced: over 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/andrebraghini/tasks-api
- Owner: andrebraghini
- Created: 2021-11-01T05:27:58.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-11-01T05:37:25.000Z (over 4 years ago)
- Last Synced: 2025-01-07T16:43:27.539Z (over 1 year ago)
- Language: TypeScript
- Size: 55.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# tasks-api
## Running on docker
Run the **build.sh** file to install dependencies and build the projects.
After that, you can run the `docker compose up`.
```sh
# Install dependencies and Build projects
./build.sh
# Run docker compose
docker compose up -d
```
Open Apollo Explorer https://studio.apollographql.com/sandbox/explorer to explore the local server running at http://localhost:4000
### Step by step test
1. Sign up
```graph
mutation {
signUp(username: "josh", password: "abc123")
}
```
2. Login
```graph
query {
login(username: "josh", password: "abc123") {
access_token
}
}
```
3. Add new task (Use the access_token from login as Authentication Bearer Token on headers)
```graph
mutation {
addTask(title: "Do something", description: "Do it fast", status: TODO)
}
```
4. Get all user tasks (Use the access_token from login as Authentication Bearer Token on headers)
```graph
query {
tasks {
id
title
description
status
}
}
```
5. Update task (Use the access_token from login as Authentication Bearer Token on headers)
```graph
mutation {
updateTask(id: "fe52e7da-4895-4ee9-8888-31cd4fe4c368", status: IN_PROGRESS) {
id
title
description
status
}
}
```