Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Unless you have specific requirements, Ive always found prisms to be bloated / heavy. I prefer Hasura.


There is also PostGraphile to turn your DB into a GraphQL API: https://www.graphile.org/postgraphile/


Do you have examples of specific requirements for which Prisma would be a good fit?


Prisma is good for writing data models, running migrations. The new admin is very usable already, although still beta. I've been very productive loading, editing and querying data.

Hasura I think is good for preexisting db, no migrations? I haven't evaluated it fully.


(I work at Hasura)

Yep! We’ve put in a lot of effort to ensure hasura Just Works on an existing db.

Incidentally, to address your last point, Hasura has its own rails like migrations system and an admin UI (that allows DDL and DML) and works well with your existing migrations tooling too if you have it already. The hasura admin UI can create the rails style migration files automatically on your disk as you work on the UI.

https://hasura.io/all-features


First time learning about Hasura. Looks really promising with the built-in _live queries_ support, which Prisma has not yet implemented (they only have subscriptions): https://github.com/prisma/prisma/issues/1205

EDIT: Never mind, looking at the docs, it looks like they also only support subscriptions... It's understandable to not have support for live queries yet, as it's still a very under-explored territory, but it's still misleading marketing on their part because they explicitly call out support for subscripts _and_ live queries on their website.

Curious how Hasura tackles the N+1 problem for efficient querying in GraphQL? Prisma uses a built-in dataloader implementation for this but I couldn't find anything about query optimization in the Hasura docs.

Also, in the docs on pagination: https://docs.hasura.io/1.0/graphql/manual/queries/pagination...

I'm only seeing examples of offset-based pagination. Is cursor-based pagination on the roadmap as well?


Answering a few points:

Hasura allows you to turn any "query" to a subscription, essentially live queries.

Hasura's query optimization is actually one of the core features. Hasura is structured as a transpiler that converts GraphQL, adds access control clauses and then renders a single SQL for the database. Very different from a typical ORM approach or the dataloader approach.

More details: https://blog.hasura.io/architecture-of-a-high-performance-gr...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: