GraphQL, Hasura and Fly

Hasura gives you an open source GraphQL backend which can make it simple to query PostgreSQL by helping you map all your schemas and roles. It also rolls in the ability to query other GraphQL services so you can mix in services. With an interactive c

Dj Walker-Morgan
2 min readbeginner
--
View Original

Overview

The article discusses how to utilize the Hasura GraphQL engine to create a GraphQL backend service, particularly focusing on deploying it using Fly. It highlights the ease of querying PostgreSQL and integrating other GraphQL services, along with the configuration steps required for deployment.

What You'll Learn

1

How to deploy Hasura on Fly for a global GraphQL backend

2

Why using Hasura simplifies querying PostgreSQL databases

3

How to configure database connections and secrets in Hasura

Key Questions Answered

How can I deploy Hasura on Fly?
To deploy Hasura on Fly, you can use a Docker image, which allows you to set up a global GraphQL backend. The process involves configuring your database connection, setting secrets, and managing the interactive console. The article provides a guide to walk you through these steps.
What is Hasura and how does it work with PostgreSQL?
Hasura is an open-source GraphQL engine that simplifies the process of querying PostgreSQL databases. It automatically maps your database schemas and roles, allowing for easy interactions with your data and the ability to integrate other GraphQL services.

Technologies & Tools

Some links below are affiliate links. We may earn a commission if you make a purchase.

Key Actionable Insights

1
Consider using Hasura for your next project if you need a GraphQL backend quickly.
Hasura's ability to automatically map PostgreSQL schemas can significantly reduce development time, making it ideal for rapid application development.
2
Utilize Fly for deploying Hasura to achieve a global backend setup.
Fly's infrastructure allows for easy scaling and deployment of applications, ensuring that your GraphQL service is accessible worldwide.
3
Explore the interactive console provided by Hasura for data analysis.
The console is a powerful tool for exploring your data and testing queries, which can enhance your understanding of the underlying database structure.

Common Pitfalls

1
Failing to properly configure database connections can lead to deployment issues.
Ensure that you have the correct database URL and credentials set in your configuration to avoid connectivity problems.
2
Neglecting to manage secrets can expose sensitive information.
Always use environment variables or secret management tools to handle sensitive data securely during deployment.