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

For debugging, you can make use of notice! macros to print out statements while using your wrapper in psql.

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

Community Wrappers

Unfortunately, we cannot support community Wrappers inside the Supabase Dashboard until the Wrappers API is stabilized. You can vote your favorite Wrapper if you'd like it to be added to Supabase in the future.

If you have developed a Wrapper that you want inside the Supabase Dashboard, please contribute it as a PR in this repo.

Once we release Wrappers 1.0, we will support community Wrappers within the Supabase Dashboard.