summaryrefslogtreecommitdiffstats
path: root/src/graphql/mutation.rs
Commit message (Collapse)AuthorAgeFilesLines
* Valid the polygon before the alert creationSanto Cariotti2024-08-291-6/+31
|
* Fix order of lat/lngSanto Cariotti2024-08-261-2/+2
|
* Add alertsSanto Cariotti2024-08-261-0/+67
| | | | | | | | | | | | | | | | | | | | | A payload for alert creation can be ``` { "query": "mutation NewAlert($input: AlertInput!) { newAlert(input: $input) { id createdAt level } }", "variables": { "input": { "points": [ { "latitude": 40.73061, "longitude": -73.935242 }, { "latitude": 40.741895, "longitude": -73.989308 }, { "latitude": 40.712776, "longitude": -74.005974 }, { "latitude": 40.73061, "longitude": -73.935242 }, ], "level": "TWO" } } } ```
* Add new positionSanto Cariotti2024-08-241-2/+59
| | | | | | | | | | | | | | | | | | ``` curl -X POST http://localhost:8000/graphql \ -H "Content-Type: application/json" \ -H "Authorization: Bearer TOKEN" \ -d '{ "query": "mutation NewPosition($input: PositionInput!) { newPosition(input: $input) { id userId createdAt latitude longitude movingActivity } }", "variables": { "input": { "latitude": 44.502952, "longitude": 11.3114988, "movingActivity": "IN_VEHICLE" } } }' ```
* Add docSanto Cariotti2024-08-231-0/+3
|
* Add loginSanto Cariotti2024-08-211-0/+35
Fields sent are ``` { "query": "mutation Login($input: LoginCredentials!) { login(input: $input) { accessToken tokenType } }", "variables": { "input": { "email": "....", "password": "..." } } } ```