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.
- Go to https://workout-logger-api-ejtky726bq-uw.a.run.app/
- 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
}
}
- take the access token and paste this into the header section at the bottom of the page
{
"Authorization": "Bearer <PASTE_ACCESS_TOKEN_HERE>"
}
- Click the docs button on the top left of the page and start running queries!
- Go
- GORM
- GQLGen
- GraphQL
- PostgreSQL
- A postgres db url
- Go installed on your machine
- Clone repo
cd
into the root of the repo- Have copy contents of
.test.env
into a new.env
file - Fill in and replace secrets and postgres database connection parameters
- Run
make dev
to start dev server ormake test
to run all integration tests
make dev
: start dev environmentmake test
: run all test filesmake format
: format all code within repomake regenerate
: regenerate graphql resolvers fromschema.graphqls
make schema_json
: generate newschema.json
file for the iOS clientmake deploy
: deploy to GCP Run
- Follow default prompts
- Deploy to us-west1