Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dtgoitia/tempus-api-django
https://github.com/dtgoitia/tempus-api-django
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/dtgoitia/tempus-api-django
- Owner: dtgoitia
- Created: 2020-02-11T19:26:33.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2022-12-08T03:37:11.000Z (about 2 years ago)
- Last Synced: 2024-10-28T13:55:09.807Z (3 months ago)
- Language: Python
- Size: 116 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Development set up
```shell
make set-up
```## GraphiQL
Run the app (`make run`) and navigate to http://localhost:8000/graphiql.
```graphql
query {
sessions {
name
description
records {
start
end
exercise {
id
name
}
}
}
plans {
id
name
description
loops {
loopIndex
rounds
description
goals {
goalIndex
exercise {
id
name
description
}
duration
}
}
}
exercises {
id
name
description
}
exercise(exerciseId: "1") {
id
name
description
}
}
```Create a session:
```graphql
mutation thisIsAnOptionalNameForTheMutation {
$name: String!,
$start: DateTime!,
$records: [RecordInput]!
) {
createSession(name: $name, start: $start, records: $records) {
session {
name
description
notes
start
records {
start
end
exercise {
id
}
}
}
}
}
```variables:
```json
{
"name": "broken session",
"start": "2020-02-21T11:03:19.337763+00:00",
"records": [
{
"exerciseId": "1",
"reps": 10,
"start": "2020-02-23T11:03:19.325868+00:00",
"end": "2020-02-23T11:03:19.335990+00:00"
}
]
}
```