TurboQL is a tool designed to automatically generate GraphQL schemas tailored to your PostgreSQL database. It exclusively supports PostgreSQL databases.
The generator seamlessly translates the information schema of your database into corresponding GraphQL models and objects. Notably, TurboQL facilitates the complete implementation of CRUD operations (create/read/update/delete) when generating GraphQL schemas.
It is crucial to ensure that your database schema is thoroughly designed with valid foreign key constraints. This is essential for establishing meaningful relationships between GraphQL objects during the schema generation process.
Setup the generator:
go install github.com/regeda/turboql/cmd/turboqlgen
How to install Golang?
Connect to your database and generate the GraphQL schema:
PG_URI='postgres://localhost:5432/postgres?sslmode=disable' turboqlgen
Run
turboqlgen --help
for help on the documentation. Or Create a new issue.
Clone our repository:
git clone https://github.com/regeda/turboql.git
Explore the Bookstore example.
The following Makefile
commands will help you to start from a scratch:
Execute the following command from the repository's root where Makefile
is located:
make
Make sure before that your Docker or a virtual machine with the Docker are running!
make docker-up
make migrate-up
make generate
make run