Introducing a native Postgres integration to Hasura Cloud in partnership with Neon

We are excited to partner with Neon to launch a new native Postgres DB integration to Hasura Cloud.

With this new integration, users can go from signing up for Hasura Cloud to their first GraphQL API in under 2 minutes. In just one click, users can create a free Postgres database and automatically add it as a data source to their Hasura Cloud project.

A simpler, faster getting started experience

Since the early days of Hasura, improving developer productivity has been core to our mission. With this native database integration, we have now removed friction in a key step of the getting started process – creating and connecting a database to your Hasura project.

The new Neon Postgres integration replaces the current Heroku connection in Hasura Cloud. Before, you’d have to go to Heroku to sign up and create a database to get a new database to try Hasura with. With the one-click Neon integration, you don’t have to leave the Hasura dashboard to create and connect a new database. We expect this to be a much better experience for new users trying Hasura for the first time.

More broadly, this integrated database + Hasura setup lets any developer create a new GraphQL backend in a seamless and quick way.

Try it out on Hasura Cloud

Step 1: Create a new project on Hasura Cloud

Step 2: Connect Neon Postgres DB in the Data tab to attach it as a Postgres data source.

Head to the DATA tab in your Hasura Cloud project console and click on the Create New Database (Free) tab.

Click on the Connect Neon Database button, and you will be prompted to Sign In to Neon. Select the Continue with Hasura option — this will automatically create an account for you and log you into Neon.

Once you log in and accept the prompts, the serverless database will be provisioned quickly, and it will be attached as a default data source in your project. The Postgres connection string of the Neon DB will be available in the Hasura Cloud dashboard under project details in the PG_DATABASE_URL environment variable.

Step 3: Create a table via the SQL tab (the table gets tracked automatically)

CREATE TABLE public.message (
    id integer NOT NULL,
    username text NOT NULL,
    text text NOT NULL,
    "timestamp" timestamp with time zone DEFAULT now() NOT NULL

Step 4: Head to API explorer and start playing around with the GraphQL queries and mutations.

query {
  message {

Check out Hasura Docs on GraphQL mutations to learn how to insert data and play around with queries.

A quick primer on Neon

Neon is a new fully-managed serverless Postgres service with modern cloud-native architecture. Neon’s architecture is built fundamentally with the notion of separating storage and compute for Postgres to bring numerous benefits like branching, auto-scaling and bottomless storage. For example, you can now scale CPU and I/O resources independently and run multiple compute instances of Postgres without copies of data. Learn more about Neon Postgres Architecture.

Neon is open-source, written in Rust and built to be 100% compatible with Postgres. The serverless design lets the unused compute resources be shut down with a quick cold start of 2 seconds, thus saving on costs and scaling up when required.

Neon offers a generous free tier for up to 3 Postgres projects. Neon is currently in closed preview with early access to limited users. We are excited to partner with them to bring the Neon serverless Postgres capabilities to the Hasura Cloud via this native integration.

Why Hasura + Neon, from the creators

Check out the Hasura Hosts Neon session where Nikita Shamgunov, Anna Stepanyan, Heikki Linnakangas, and Tanmai Gopal talk about how serverless Postgres combined with automated GraphQL APIs enhance developer workflows and increase efficiency while building and scaling. This will also give a sneak peek into Neon’s branching feature that opens up new possibilities to developers building apps requiring preview environments for databases.

Help & resources

If you are facing any issues with the integration, file a support ticket by navigating to the Help & Support tab on the Hasura Cloud dashboard. Or join the Hasura Discord channel for community support and discussions.  

For more on Neon, check out the docs on Neon integration

Looking to learn more about integration? We have an episode coming up on The Data and API show. So stay tuned!

18 Oct, 2022
Subscribe to stay up-to-date on all things Hasura. One newsletter, once a month.
Accelerate development and data access with radically reduced complexity.