Need advice about which tool to choose?Ask the StackShare community!

Hasura

333
631
+ 1
144
PostGraphile

87
214
+ 1
47
Add tool

Hasura vs PostGraphile: What are the differences?

Introduction

In this article, we will compare the key differences between Hasura and PostGraphile.

  1. Architecture: Hasura is based on a microservices architecture, where GraphQL requests are sent to a separate server. On the other hand, PostGraphile is a library that runs directly on top of a PostgreSQL database and exposes the GraphQL API through PostgreSQL itself. This difference in architecture affects how the two solutions are deployed and managed.

  2. Ease of Setup: Hasura provides a web-based console that makes it easy to set up a GraphQL API on top of existing databases. It auto-generates the GraphQL schema and allows real-time data updates out of the box. PostGraphile requires manual configuration and customization, as it directly uses the PostgreSQL schema and requires writing SQL queries for more advanced features.

  3. Real-time capabilities: Hasura has built-in support for real-time subscriptions, allowing clients to receive instant updates whenever the data changes. PostGraphile does not have native support for real-time subscriptions, but it can be augmented with external tools like Postgres Pub-Sub or GraphQL subscriptions using Apollo.

  4. Extensibility: Hasura provides a plugin system that allows extending its functionality by adding custom GraphQL resolvers and event triggers. This allows developers to add custom business logic or integrate with external services. PostGraphile, being a library, requires more manual work to extend its functionality, like writing custom code in the form of smart tags or using PostgreSQL triggers.

  5. Permissions and Access Control: Hasura has a built-in role-based access control system that allows granular control over who can access which parts of the API. It also provides fine-grained query-level authorization using GraphQL queries or webhooks. PostGraphile relies on PostgreSQL's user roles and permissions for access control, which may require manually managing database roles and permissions.

  6. Developer Experience: Hasura's web-based console provides a user-friendly interface for exploring and interacting with the GraphQL API, making it easier for developers to get started. PostGraphile, being a library, may require more configuration and set up upfront, making it better suited for developers with a deeper understanding of GraphQL and PostgreSQL.

In summary, Hasura and PostGraphile differ in their architecture, ease of setup, real-time capabilities, extensibility, permissions and access control, and developer experience.

Manage your open source components, licenses, and vulnerabilities
Learn More
Pros of Hasura
Pros of PostGraphile
  • 23
    Fast
  • 18
    Easy GraphQL subscriptions
  • 16
    Easy setup of relationships and permissions
  • 15
    Automatically generates your GraphQL schema
  • 15
    Minimal learning curve
  • 13
    No back-end code required
  • 13
    Works with new and existing databases
  • 12
    Instant production ready GraphQL
  • 11
    Great UX
  • 4
    Low usage of resources
  • 4
    Simple
  • 10
    Postgres based authentication
  • 6
    Great developer support
  • 5
    Lightning fast
  • 5
    Database first with no braking changes
  • 4
    Simple to set up and scale
  • 4
    Bye bye Resolvers
  • 3
    Back to database first
  • 3
    9 Automatically generates your GraphQL schema
  • 3
    Easy setup of relationships and permissions
  • 3
    Instant production ready GraphQL
  • 1
    Works with new and existing databases

Sign up to add or upvote prosMake informed product decisions

Cons of Hasura
Cons of PostGraphile
  • 3
    Cumbersome validations
    Be the first to leave a con

    Sign up to add or upvote consMake informed product decisions

    - No public GitHub repository available -

    What is Hasura?

    An open source GraphQL engine that deploys instant, realtime GraphQL APIs on any Postgres database.

    What is PostGraphile?

    Execute one command (or mount one Node.js middleware) and get an instant high-performance GraphQL API for your PostgreSQL database

    Need advice about which tool to choose?Ask the StackShare community!

    What companies use Hasura?
    What companies use PostGraphile?
    Manage your open source components, licenses, and vulnerabilities
    Learn More

    Sign up to get full access to all the companiesMake informed product decisions

    What tools integrate with Hasura?
    What tools integrate with PostGraphile?

    Sign up to get full access to all the tool integrationsMake informed product decisions

    What are some alternatives to Hasura and PostGraphile?
    Firebase
    Firebase is a cloud service designed to power real-time, collaborative applications. Simply add the Firebase library to your application to gain access to a shared data structure; any changes you make to that data are automatically synchronized with the Firebase cloud and with other clients within milliseconds.
    Heroku
    Heroku is a cloud application platform – a new way of building and deploying web apps. Heroku lets app developers spend 100% of their time on their application code, not managing servers, deployment, ongoing operations, or scaling.
    Prisma
    Prisma is an open-source database toolkit. It replaces traditional ORMs and makes database access easy with an auto-generated query builder for TypeScript & Node.js.
    Apollo
    Build a universal GraphQL API on top of your existing REST APIs, so you can ship new application features fast without waiting on backend changes.
    GraphQL
    GraphQL is a data query language and runtime designed and used at Facebook to request and deliver data to mobile and web apps since 2012.
    See all alternatives