run the docker compose file using
docker compose upnavigate to http://localhost:8080 to use GraphIQL to call endpoints.
query {
posts {
id
text
authorUser {
id
name
}
comments(limit: 10) {
text
authorUser {
id
name
}
}
}
}This project was setup following steps from https://gqlgen.com/getting-started/
Generating and updating the go code based on schema can be run using the command
go run github.com/99designs/gqlgen generatenote requires the database be up and running to generate against a live schema.
jet -dsn="postgresql://messageboard-db-user:messageboard-db-password@localhost:5432/messageboardDB?sslmode=disable" -path=./.gen