One word: Hasura. It’s an incredible tool for bootstrapping the backend and serving data for your app. It‘s built on top of GraphQL and PostgreSQL — battle-tested tools by developers around the world.
What is Hasura?
Hasura is a service that manages how to serve your data. Thanks to using GraphQL language you can easily compose queries to retrieve data more efficiently. You don’t need to worry about making a backend, endpoints, writing resolvers, setting up a database — everything is managed by Hasura!
You can check here how to start using it in the official documentation. It takes less than 5 minutes to get started. Hasura is self-hosted software but also offers cloud hosting. The cloud option is free and it’s perfect for getting started.
Hasura has so many features, it’s like a Swiss pocket knife where you can find everything you need for creating an application backend. From serving data, with relationships and subscriptions to webhooks and cron jobs.
This is the most powerful functionality. Just serve data! Everything you create in the database editor is reflected in the GraphQL editor.
When you add data and connect tables with relationships you end up with something like this.
In Hasura you can use GraphQL subscriptions out of the box. Subscriptions are sending data in real-time to users using web sockets. When you change something in the database, you don’t need to fetch data again. Your server (Hasura) sends new data and notifies you that something was changed.
In Hasura we can define a role for every action on the table. With inherited roles that are recently added, you can define global roles and assign them permissions.
We can react to changes made in your database. We can set up which events Hasura should react to and send a payload to a specified webhook.
In advanced settings, we can pick on which column update we want to send requests to webhook and which we want to omit. Great for sending email confirmation when your email changes. Everything can be set up in Hasura!
… and much more
Besides that, I wrote before we can use Remote schemas to connect more GraphQL schemas into single endpoints. It’s great when you have microservices architecture. You can connect it into a single endpoint! Also, there are:
- One-off Scheduled Events helps us create an event that will fire once at a specified timestamp.
- Also, Hasura has Cron jobs, the possibility to requests a webhook periodically with a custom payload.
- With Actions, we can extend Hasura logic to add data validations.
- Monitoring helps us get to know your database usage, active connection or restrict API limit.
I mean that! You don’t need a backend developer, at least for serving data. Hasura is making this pleasant to work with the data we have defined in the database editor. Helps us make relations, permissions and add some other useful features. More information you will find on their website.