Live data from Hacker News

Hasura raises $9.9M to simplify GraphQL

techcrunch.com

141–150 of 199 posts

Re: Hasura raises $9.9M to simplify GraphQL

#141
post #36

Earlier quoted context omitted.

If you love hasura and want something like firebase, please check out the tutorial with hasura + RxDB. It is like having a firebase with better offline-first and more features and of course without vendor lock-in. https://hasura.io/blog/building-an-offline-first-web-app-wit...

What I liked with Firebase was how easy and fast everything was. One-click create a new project and everything was ready to use. It's this developer experience I want to mimic with Nhost. By providing a managed backend with simple to use js-sdk ( https://github.com/nhost/nhost-js-sdk ).

I had the opposite experience with Firebase.

Amazing at first, but quickly fell apart when I had to implement any sort of meaningful business logic.

Re: Hasura raises $9.9M to simplify GraphQL

#142
post #53

Some major players in the "GraphQL in a box" space: https://www.graphile.org/postgraphile/ https://hasura.io/ https://www.prisma.io/ There are plenty of "REST API in a box" solutions as well: https://github.com/PostgREST/postgrest https://github.com/prest/prest https://resthapi.com/

I started with Hasura and I implemented it on two business projects. It was a great first step but the lack of customization quickly became an issue. Having the logic split between several services was another big issue (Hasura + firebase auth + serverless functions for any logic). Ultimately it resulted in a slower development speed than what we were doing at my company before using Hasura (custom GraphQL backend development).

Several months ago we switched to Postgraphile, and it solved the issues mentioned above. The plugin system allows us to implement the custom logic in a simple and performant way, whether it's a custom validation on a mutation or tweaking the GraphQL type system. And all the logic is centralized in one project. It's clean, fast and testable.

Another big advantage is that Postgraphile relies on Postgres RLS for permissions, which allows us to manage it using normal SQL migrations. In comparison, we had a lot of pain evolving an existing permission schema on Hasura.

Postgraphile can also automatically expose a Relay compliant schema, supporting Relay connections. It's not possible with Hasura.

Except for pure read-only GraphQL APIs, I strongly recommend looking into Postgraphile over Hasura.

Re: Hasura raises $9.9M to simplify GraphQL

#143
post #46
post #23

Earlier quoted context omitted.

Yep! The GraphQL resolution logic and the permissions get reused automatically.

I gave it a try, to be honest, I feel it too cumbersone, I expected it to use already available mutations not just copying existing types. What I really want/need is custom logic that run IN the resolvers of already available query/mutations with the request as input and the possibility to either return an error or modify the payload before it hit the database but I know is still in preview, will check it again when…

Agree. This is one of the issue we have with Hasura and it's what made us switch to Postgraphile.

Re: Hasura raises $9.9M to simplify GraphQL

#144
post #53

Some major players in the "GraphQL in a box" space: https://www.graphile.org/postgraphile/ https://hasura.io/ https://www.prisma.io/ There are plenty of "REST API in a box" solutions as well: https://github.com/PostgREST/postgrest https://github.com/prest/prest https://resthapi.com/

add apollo too, no?

https://www.apollographql.com/

Re: Hasura raises $9.9M to simplify GraphQL

#145

Earlier quoted context omitted.

These aren't the same things. Hasura is not an admin interface, although it provides something like one. It's an application API. The django admin interface is not usable by a frontend as an application API. Django requires you to "meta-model" you have to write Python classes that map to your tables, this is usually duplicate work. Django's ORM must support many databases, so it produces "least common denominator" SQ…

> Django requires you to "meta-model" you have to write Python classes that map to your tables, this is usually duplicate work. You don't have to duplicate any work because you don't actually have to write any raw SQL, since it all gets translated by Django. So yes, there's an extra layer of abstraction there, but no duplication on the developer's part. > Django's ORM must support many databases, so it produces "leas…

> You don't have to duplicate any work because you don't actually have to write any raw SQL, since it all gets translated by Django. So yes, there's an extra layer of abstraction there, but no duplication on the developer's part.

There is still some duplication of effort, for example when you change the model, yes django will create the migration script for you, but you always have to verify it and often change it especially when you're merging branches. And since the migrator only supports a subset of postgres' DDL abilities, even simple things like renaming objects, or applying advanced indexing techniques you often have to write hand sql migrations anyway, which require you knowing sql, so why not just do all in sql?

> Hasura and related projects are really great, don't get me wrong, but this is outright FUD. There are pros and cons to both approaches, and to claim that one is "utterly obsolete" is nonsense. There are lots of situations in which turning the database into your API just doesn't make sense.

It was a strong statement of an unpopular opinion, but FUD is a fundamentally dishonest statement, and I did clearly prefix my statement with "This is my opinion and I'm sure I'll get downvoted for it". As someone who knows my opinions well you know I honestly believe it. But that's ok I appreciate you keeping me on my toes when the coffee gets me in an agitated state!

That being said, I still do believe it. I do pick on Django pretty hard, but I feel the same way about many of the Python frameworks to a certain degree and the "web application framework" pattern in general. Django is just the one I have seen the most bloviated circumlocution of code to do simple tasks with, and often when I have run into problems with Django, it was usually Django's fault (ahem, autocommit) not the developers. It's a classic foot gun.

A recent example I have had to boggle at, a half dozen AppEngine microservices, cross calling each other with http RPC all autocommiting to 3 different postgres databases with less than 100k rows of data total. The microservices were entirely responsible for maintaining referential integrity entirely defeating the point of using postgres in the first place.

The whole thing could have been a set of simple functions, much of the heavy lifting could have been done with some simple triggers. But instead "microservices". That worked ok when there was only one instance of each service, but then when app engine scaled up it became a knot of race conditions.

Re: Hasura raises $9.9M to simplify GraphQL

#147
post #22

This is fantastic to see. First time I tried out Hasura back in late 2018 I was AMAZED. After going through multiple different stacks such as MeteorJS, Firebase, building my own REST/GraphQL API etc. Nothing really felt right. That was until I found out about Hasura. I actually had to assemble a quick meetup at the co-working space I was on (true story) to show everybody this software. Hasura Tweet: https://twitter.c…

Firebase user here. I love Firebase because it offers so many components that (usually) play well together: Databases, Authentication, Machine Learning, Storage, Crash Reporting, Analytics, Messaging etc.

Which parts of Firebase is Nhost replacing?

Re: Hasura raises $9.9M to simplify GraphQL

#148

One thing that bothers me about systems like this is the underlying assumption that database architecture always reflects the presentation. But what if ti doesn't? I am looking at the Hasura docs and all it really says is "we will generate everything for you based on your database schema and here is the way we do it". But what if I don't want some tables to be exposed? What if I want to expose custom queries instead…

Data-driven architectures are very relevant, in particular in a corporate / business environment. I found all the answers in the docs. A SQL Schema can carry a custom query, it's called a view. A SQL Schema can carry a custom algorithm, it's called a function or a generated column. You can always deactivate permissions on a table to not expose it, my bet is that your backoffice will need to though. On top of that, Ha…

> A SQL Schema can carry a custom query, it's called a view.

This is not feasible. I might not have enough access to create views. I might not have access to create functions. I cannot deactivate permissions if I only have a single access account and other systems use it already. You cannot assume that I have full control of the database or that I can easily make changes to the schema.

But this is not all. I am working on a web backend project on daily basis. I would love to offload some basic CRUD operations to something like postgrest or implement GraphQL with something like Hasura, but I need a way to a) define table and field name mappings b) define what tables are accessible b) define what columns are visible c) define what nested relationships are allowed d) define actions that need to happen on update/insert/delete operations (i.e. push a message into a queue every time a record is deleted from table T) If I could do all of this, I could implement about 50% of my web service and it would be useful.

Re: Hasura raises $9.9M to simplify GraphQL

#149

One thing that bothers me about systems like this is the underlying assumption that database architecture always reflects the presentation. But what if ti doesn't? I am looking at the Hasura docs and all it really says is "we will generate everything for you based on your database schema and here is the way we do it". But what if I don't want some tables to be exposed? What if I want to expose custom queries instead…

> I feel that products like Hasura and postgrest would be a lot more useful if there was a way for me to specify a list of data sources on one side and get a fully formed GraphQL or REST service on the other side rather than going "I know what you need better than you" route. Hasura internally has a metadata engine that does exactly this. You explicitly specify what tables/views/functions you want to expose and how y…

I will need to take a closer look. If you are right, this might be more useful than I thought at a casual glance.

Re: Hasura raises $9.9M to simplify GraphQL

#150
post #37

If GraphQL needs $9.9M to be simple enough for developers to actually use it, why was it invented?

Probably for the same reason that companies like MongoDB, Citus, GitLab, Elastic, and more have taken investment money.

To be fair, some of those are full database engines; they have lots of inherent complexity to tackle.

Hasura provides an interface to a database(/s) engine. GraphQL was supposed to solve the interface problem but it looks like it has created a lot of accidental complexity to tackle.

Post reply on HN