Announcing local development support for Hasura DDN

Hasura DDN beta, which launched in April this year, was a huge milestone for us and the Hasura community.

Today, we are excited to launch support for local development workflows and self-hosting to Hasura DDN.

This marks a big step forward in our march to the general availability of Hasura DDN.

You can give it a try here:

Build a local supergraph with Hasura

The early feedback on Hasura DDN has been great so far, and we can’t wait to hear your thoughts on this new release.

Cloud-first… not cloud-only

In the first beta release of Hasura DDN, we prioritized a cloud-first deployment model like many modern developer tools.

When you run DDN CLI commands, it operates on Hasura DDN running in the cloud. Supergraph builds are created and stored in the cloud. Client requests to the GraphQL API are executed against the global, distributed Hasura DDN.

This cloud-first workflow simplifies the getting started experience. As a developer iterating on an API, you don’t have to worry about installing Hasura, deploying connectors, or any related infrastructure operations. You simply work with your Hasura project via an IDE or CLI and all the ops stuff is handled for you by the fully managed Hasura DDN.  

While there is a lot of convenience in this approach, many developers prefer having the option to install the framework locally, alongside their existing tooling and setup, especially during the development stage.

That’s where today’s Hasura DDN announcement comes in.

With local development support in Hasura DDN, developers can now easily build, test, and run a supergraph on their local machine. This will enable everyone to iterate quickly with hot reload support.

Local development example

Suppose you want to use Hasura to build a GraphQL API on some PostgreSQL tables and then layer in some business logic via TypeScript functions.

To do this with a local-only workflow, you can run all the components locally:

  • PostgreSQL connector (via Docker Compose)
  • TypeScript connector (via a node package) **
  • Hasura engine (via Docker Compose)

** The TypeScript connector is available as a node package, making it easy to use local node tooling, including the npm package manager and editor support. In this case, using npm run start will bring up the TypeScript connector. The TypeScript connector is also available through Docker Compose for self-hosting scenarios.

The locally running connectors can talk to data sources running on the local machine or in the cloud.

Sample Docker Compose file for running Hasura locally.

Point the online Hasura Console to the local Hasura engine to get the full exploratory power of Hasura DDN Console on your local API, including Supergraph Explorer, a rich GraphiQL editor, deep observability with tracing, and more.  

The Hasura Console works with a local instance of the Hasura engine.

Hasura DDN uses Docker to distribute the connectors and the engine, avoiding the need for any additional setup on the local machine. The generated Docker Compose files are templates for you to build your own containers and deploy them in any self-hosted configuration. These containers completely self-describe their runtime behavior.

Because all the components to build and run a supergraph are run locally, you can bring your own tools as well, such as database management, debugging code, testing, etc.

Local to cloud in a snap

Local development in Hasura DDN follows the same workflows and concepts as the cloud-first flow:

  • Configure a connector
  • Configure the Hasura engine to talk to the connector
  • Introspect models and commands, and configure the API
  • Create a supergraph build

This means the transition from local runtime to cloud runtime is as easy as pointing from local to cloud. All the configurations can stay the same.

Local development is free. Always.

And the best for last: Everything required to run your API – the engine and the connectors – is open source so you can build what you want and host yourself without any limits. You can build, test, and serve a supergraph of any scale and at any load.

Get started today!

With local development support, Hasura DDN is like any other framework you can build against. The connectors and engine are just services you can run and customize yourself.

Get started with local development

Other resources:
Hasura v3 Engine on GitHub
Hasura Connector Hub

Blog
12 Jun, 2024
Email
Subscribe to stay up-to-date on all things Hasura. One newsletter, once a month.
Loading...
v3-pattern
Accelerate development and data access with radically reduced complexity.