/plushcap/analysis/hasura/hasura-vs-prisma-9ffc7271eda8

Hasura vs Prisma

What's this blog post about?

Hasura and Prisma are both tools that provide a GraphQL API over Postgres. However, they differ in their ideal placement within a tech stack and the value they add to projects. Hasura is designed for frontend applications, while Prisma is intended as a GraphQL ORM for GraphQL or REST servers. Prisma cannot be used directly by frontend apps, but Hasura can serve as a GraphQL API for microservices. In terms of business logic, Prisma provides clients and bindings for nodejs/typescript/go to build custom business logic that communicates with the database. On the other hand, Hasura offers two ways to write business logic: either by creating a unified GraphQL endpoint or through webhooks triggered by changes in the database. Hasura also provides access control and authorization features for securing data access, integrating with various authentication systems like JWT. It supports performance optimization through its high-performance architecture that compiles GraphQL queries into single SQL queries with access-control clauses. Additionally, Hasura has a low resource footprint compared to Prisma's requirement of the JVM. Scaling and managing Postgres is seamless with Hasura, as it supports the entire Postgres type system and operators, custom SQL functions, and materialized views. In contrast, Prisma requires manual management of database migrations through GraphQL SDL, which may not be sufficient for complex applications.

Company
Hasura

Date published
Oct. 11, 2018

Author(s)
Tanmai Gopal

Word count
977

Hacker News points
None found.

Language
English


By Matt Makai. 2021-2024.