Skip to content

Watching Your Database in Development

Compare
Choose a tag to compare
@calebmer calebmer released this 18 Oct 20:00
· 10350 commits to main since this release

This release adds watch functionality to PostGraphQL 🎉

When developing PostGraphQL, it’s nice to have a fast feedback cycle. Being able to open PostGraphQL in one window and a Postgres query input in the other while PostGraphQL automatically updates is a great way to develop rapidly.

To use just pass in --watch and/or watchPg: true (depending on if you are using the CLI or the middleware). PostGraphQL will add an event trigger to your database (can only be done if you start PostGraphQL as a superuser), and whenever it gets a notification from that trigger PostGraphQL will automatically rebuild the schema. See a demonstration below:

PostGraphQL Watch Demonstration