This is an example project. It is a basic todolist web api ( graphql and rest ) using rust.
If you have docker installed, you can do :
docker-compose up
Then the api should be accessible at http://localhost:3030
To run the project you need to have a postgres database and rust installed.
You can then configure the environment variable in the docker-compose.yml
file to use your postgres database.
Then you can start the project using :
cargo run
The api should be accessible at http://localhost:3030
POST /graphql
: Endpoint for graphql requestsGET /graphiql
: Graphql playground ( You can also find graphql docs )
GET /todo-lists
: List all todo listsGET /todo-lists/:id
: Get details about a todo list with the provided idPOST /todo-lists
: Create a new todo list ( label must be provided as json :{"label": "a label"}
)DELETE /todo-lists/:id
: Delete todo lists with provided id
GET /todos/:id
: Get details about a todo with the provided idPOST /todos
: Create a new todo ( label must be provided as json :{"label": "todo label", "todoListId": "..."}
)DELETE /todos/:id
: Delete todo with provided idGET /todos/:id/toggle
: Toggle the todo id with the provided id