Skip to content

Contributing

supabase/wrappers is OSS. PRs and issues are welcome.

Development

Requirements:

  • rust
  • cargo
  • docker-compose
  • pgrx

Testing

Tests are located in ./test/sql with expected output in ./test/expected

To run tests locally, execute:

1
2
cd wrappers
docker-compose -f .ci/docker-compose.yaml run test-wrappers 

Interactive PSQL Development

To reduce the iteration cycle, you may want to launch a psql prompt with wrappers installed to experiment

1
2
cd wrappers
cargo pgrx run pg14 --features clickhouse_fdw

Try out the commands below to spin up a database with the extension installed & query a table using GraphQL. Experiment with aliasing field/table names and filtering on different columns.

1
2
> create extension wrappers cascade;
CREATE EXTENSION

Documentation

All public API must be documented. Building documentation requires python 3.6+

Install Dependencies

Install mkdocs, themes, and extensions.

1
pip install -r docs/requirements_docs.txt

Serving

To serve the documentation locally run

1
mkdocs serve

and visit the docs at http://127.0.0.1:8000/wrappers/

Deploying

If you have write access to the repo, docs can be updated using

1
mkdocs gh-deploy