Skip to main content
Version: PromptQL

Deploying your project to Hasura DDN

Deploying your project to Hasura DDN is a simple process and can be done in two steps.

Deployment flow

  1. Create a supergraph build on Hasura DDN.
  2. Apply the supergraph build to your project on Hasura DDN.

To begin this guide you will need to have a local project set up. Check out the quickstart for more information on how to get started.

Hasura DDN Cloud projects

When you initialize a new project — like in the quickstart — we automatically provision a Hasura DDN Cloud project that's paired with your local project.

Step 1. Create a supergraph build on Hasura DDN

The following will use the project name in your .hasura/context.yaml file:
ddn supergraph build create

This command will create builds for each connector, subgraph, and the supergraph. Each of these can be built independently but this command will create them all.

The CLI will respond with the build version, the Console URL, the PromptQL URL, the Project Name, and a hint to browse the build on the console.

You can now use the PromptQL playground to test your build by running ddn console --build-version <build-version> command.

The build is not yet the "official" applied API for the project. A project can have multiple builds, but only one applied at a time as the "official" API.

Step 2. Apply the build

# E.g., ddn supergraph build apply 85b0961544
ddn supergraph build apply <build-version>

This build is now the "official" applied API for the project and is accessible via the API URL in the output of the command, via the console, or any client accessing via the API URL.

Simplify your deployment

For a more efficient deployment process, you can create and apply the supergraph build in a single command using ddn supergraph build create --apply

Summary

There are many more options and configurations available for deploying your project to Hasura DDN and we have detailed the simplest and most common flow here.