https://github.com/neil-ptr/until-failure-api
GraphQL API for my workout logger written using Go
https://github.com/neil-ptr/until-failure-api
Last synced: 5 months ago
JSON representation
GraphQL API for my workout logger written using Go
- Host: GitHub
- URL: https://github.com/neil-ptr/until-failure-api
- Owner: neil-ptr
- Created: 2022-09-02T05:00:05.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2024-02-24T22:50:48.000Z (over 2 years ago)
- Last Synced: 2025-06-20T10:37:59.629Z (about 1 year ago)
- Language: Go
- Homepage:
- Size: 429 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README

# Workout Logger API
The GraphQL api for a very simple workout logger app I built for myself to track progression of weight I'm lifting for certain exercises.
# Try It Out
1. Go to https://workout-logger-api-ejtky726bq-uw.a.run.app/
2. Do a login mutation to get the access token by pasting and running
```
mutation Login{
login(loginInput: {email:"test@test.com", password:"password123"}) {
accessToken
refreshToken
}
}
```
3. take the access token and paste this into the header section at the bottom of the page
```
{
"Authorization": "Bearer "
}
```
4. Click the docs button on the top left of the page and start running queries!
# Techonologies Used
- Go
- GORM
- GQLGen
- GraphQL
- PostgreSQL
# Prereqs
- A postgres db url
- Go installed on your machine
# Setup
1. Clone repo
2. `cd` into the root of the repo
3. Have copy contents of `.test.env` into a new `.env` file
4. Fill in and replace secrets and postgres database connection parameters
5. Run `make dev` to start dev server or `make test` to run all integration tests
# Commands
- `make dev`: start dev environment
- `make test`: run all test files
- `make format`: format all code within repo
- `make regenerate`: regenerate graphql resolvers from `schema.graphqls`
- `make schema_json`: generate new `schema.json` file for the iOS client
- `make deploy`: deploy to GCP Run
# Deployment
1. Follow default prompts
2. Deploy to us-west1