|
|
|
|
|
by lewisl9029
2636 days ago
|
|
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? |
|
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...