Live data from Hacker News

Hasura raises $9.9M to simplify GraphQL

techcrunch.com

181–190 of 199 posts

Re: Hasura raises $9.9M to simplify GraphQL

#181

I looked at Hasura a while back, and to be honest I thought it was the antithesis of all the things I loved about GraphQL so I moved on. Perhaps someone can convince me differently? The thing I love most about GraphQL is that serves as the perfect contract layer between the front end and the backend. A very productive development method I've used is to have the front end and back end teams agree on the GraphQL types…

Do you really need to decouple frontend and backend in the first place?

Why not separating concerns instead of separating technologies? Tight coupling of UI with database but decoupling of e.g. admin UI/backend from end-user UI/backend.

I'm the author of a Node.js RPC implementation (https://github.com/reframejs/wildcard-api) and the idea is the exact opposite of what you are prescribing: highly coupled frontend business logic with database schema/queries. Makes things so much simpler, in my experience.

Re: Hasura raises $9.9M to simplify GraphQL

#182

Earlier quoted context omitted.

Django has had an automatic admin site since 2006 or earlier, this isn't a game changer for me.

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…

Curious, what do you think of RPC instead of GraphQL?

E.g. https://github.com/reframejs/wildcard-api for JavaScript.

The neat thing about RPC is that you can tap into the full power of PostgreSQL "directly" from the frontend.

Re: Hasura raises $9.9M to simplify GraphQL

#183
post #174

Earlier quoted context omitted.

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.

Yes I agree with you. With Hasura there are 3 main ways to handle business logic. We use the first one at Nhost and it's working (and scale) very well. 1. https://3factor.app/ 2. Actions - https://hasura.io/docs/1.0/graphql/manual/actions/index.html 3. Remote Schema - https://hasura.nhost.io/console/remote-schemas/manage/schema... I know Hasura is actively working on this exact issue and they just released Actions (s…

Having tried remote schemas and reading about actions - I should say it doesn't feel right.

@elitan - just checking nhost. Features sounds promising.

Did you use hasura for building nhost's backend as well ?

Re: Hasura raises $9.9M to simplify GraphQL

#184
post #183
post #174

Earlier quoted context omitted.

Yes I agree with you. With Hasura there are 3 main ways to handle business logic. We use the first one at Nhost and it's working (and scale) very well. 1. https://3factor.app/ 2. Actions - https://hasura.io/docs/1.0/graphql/manual/actions/index.html 3. Remote Schema - https://hasura.nhost.io/console/remote-schemas/manage/schema... I know Hasura is actively working on this exact issue and they just released Actions (s…

Having tried remote schemas and reading about actions - I should say it doesn't feel right. @elitan - just checking nhost. Features sounds promising. Did you use hasura for building nhost's backend as well ?

Yes Nhost is built on the same stack you get with a new Nhost project.

Re: Hasura raises $9.9M to simplify GraphQL

#185
post #173

Earlier quoted context omitted.

I'm a web entrepreneur and for my project i've been using Parse server project (1) implementation by Back4app (2). For the non initiated, Parse server is a API server module for Node/Express + mongo + websocket and stuff you need to run a commercial app like auth, role management et all. We chose this because : 1.Open source (no vendor locking although now i'm sure if i had to move from b4a it would be a small PITA 2…

Yes! The main advantages for me with the Hasura/Nhost stack is: 1. SQL (Thanks PostgreSQL) 2. Instant realtime GraphQL (Thanks Hasura) 3. Zero vendor lock-in

> 3. Zero vendor lock-in

This is wrong. For basic features that are absolutely needed for a real-life app you will need the "Pro" hasura license.

Re: Hasura raises $9.9M to simplify GraphQL

#186
post #167

Earlier quoted context omitted.

I made the same evaluation 2 months ago and came to the same decision. But in my case it was because my existing database is a fairly complicated beast with a lot of updating through stored procedures on views. Hasura wanted to have control of what is happening in the database and there was zero chance that it would agree with the existing triggers about what should happen or how it worked. (Example of an issue, Hasu…

> But in my case it was because my existing database is a fairly complicated beast with a lot of updating through stored procedures on views. Hasura wanted to have control of what is happening in the database and there was zero chance that it would agree with the existing triggers about what should happen or how it worked. (Example of an issue, Hasura wants to own the view and view structure so that it can make real…

My profile has my email address.

Anyways here is the use case. We have a table named model.nodes. We have various model.foo_detail tables. And views named model.foo. Every foo is a node. (Clearly this schema predates our interest in GraphQL...) We have triggers on the foos so that they can update the underlying combinations of tables correctly, and also keep an audit log. We have an external CMS running off of a different architecture which handles authentication.

There are additional complications that I am not going into, such as the fact that every client installation will have new, client specific tables, in a client specific schema.

We wanted to have all of the _detail tables hidden. To choose what to expose. To rename some things here and there. To lift the foreign key relationships from foo_details to the exposed foo. To have all authorization handled by the application that already handles it. To allow subscriptions to root objects with as little overhead as possible. To add custom pub-sub channels that were also available for customers. To have a client installation include client specific tables (albeit with a bit of renaming to guarantee no conflicts between what the client has and anything we ever will have in our core product). And to make it easy to maintain it going forward.

3 of us independently looked at all the available tools. We independently came to the same conclusion. The two most mature products were Hasura and Postgraphile. Hasura on our database presented an interface that was nothing like what we wanted to show, and we didn't see how to customize to be what we wanted. Postgraphile did a better job out of the box, and we could see how to make it give us exactly what we wanted. (Yes, we had to do things like add pg_notify statements to our stored procedures, but it was straightforward.)

And yes, the language mattered. For example neither Hasura nor Postgraphile offers an out of the box integration with the random CMS we were dealing with. But none of us know Haskell, all of us know JavaScript, and Postgraphile is not hard to integrate with passport.js. And through that we can do anything that we want.

There is an old programming rule. "Only one person gets to be clever at a time." We were already dealing with a database schema with a lot of cleverness built in. Hasura has a lot of cleverness as well. You are right that Hasura didn't want to actually control* our database, but we broke its expectations pretty badly and would have to modify it pretty extensively to make it work like we wanted.

Re: Hasura raises $9.9M to simplify GraphQL

#187

Instead of Hasura and GraphQL, you can use RPC and directly write SQL queries to retrieve and mutate data. One way to think about this is that with RPC you remove the whole API layer and directly write SQL queries instead, while permissions are defined programmatically on a case-by-case basis. This is much simpler than Hasura! For Node.js there is https://github.com/reframejs/wildcard-api . For other backends you can…

I appreciate your zeal in marketing this product, but you're comparing apples and oranges. You are speaking of the ease of how you can write SQL queries. With Hasura, Postgraphile, Prisma, and their generated REST counterparts, you aren't writing any SQL queries. You are creating your database schema and then launching the respective apps. Obviously some customization will be necessary since almost no app are 100% CRUD.

But I took a look at your RPC tool, and it adds a lot of boilerplate work. This RPC boilerplate is exactly why alternatives like Hasura, Prisma, and Postgraphile exist.

Also you can't add an RPC layer and magically call it simpler. If you add Postgraphile, Prisma, Hasura in front of the database, it is just as simple, just as much a layer on top of the database. Only in this case you're writing to a published open spec (GraphQL) so the client doesn't have to know if it's talking to a relational database, a Redis cache, a REST data server, an in-memory data model, or whatever.

Your tool on the other hand is just another vendor-specific ORM or manual query engine. If that works for you, great. It is not a good alternative or answer to what is being discussed here.

Re: Hasura raises $9.9M to simplify GraphQL

#188

Instead of Hasura and GraphQL, you can use RPC and directly write SQL queries to retrieve and mutate data. One way to think about this is that with RPC you remove the whole API layer and directly write SQL queries instead, while permissions are defined programmatically on a case-by-case basis. This is much simpler than Hasura! For Node.js there is https://github.com/reframejs/wildcard-api . For other backends you can…

I appreciate your zeal in marketing this product, but you're comparing apples and oranges. You are speaking of the ease of how you can write SQL queries. With Hasura, Postgraphile, Prisma, and their generated REST counterparts, you aren't writing any SQL queries. You are creating your database schema and then launching the respective apps. Obviously some customization will be necessary since almost no app are 100% CR…

> you're comparing apples and oranges

I agree, Hasura and Wildcard have different goals. Still, the merits of each tool can be talked and discussed about.

> you aren't writing any SQL queries. You are creating your database schema and then launching the respective apps. Obviously some customization will be necessary since almost no app are 100% CRUD.

I'm not against ORMs. On the contrary, I've always been (and still am) looking for an ORM that takes care of 90% of queries (basic CRUD queries) while preserving the full power of SQL for the 10% of queries that require more powerful queries. Most ORMs do that part wrong and make writing custom SQL queries complex. I really want such ORM and I even tinkered and implemented one for a hobby project.

Also I believe that an ORM to be a wonderful combo with Wildcard, such as Prisma. (Prisma is pretty much an ORM and can be used without GraphQL.) I would argue that Prisma + Wildcard to be superior to Prisma + GraphQL. (With the exception of when you need need third-party devS to access your data -- you then need a generic API with either REST or GraphQL.)

> But I took a look at your RPC tool, and it adds a lot of boilerplate work.

I couldn't disagree more; Wildcard is deliberately designed to abstract away as much boilerplate as possible. I'd be more than happy to see a concrete example that proves me wrong. My guess is that you won't prove such example because there virtually isn't such.

> This RPC boilerplate is exactly why alternatives like Hasura, Prisma, and Postgraphile exist.

That's a vague sentence and doesn't make any sense to me.

> it is just as simple, just as much a layer on top of the database.

Wildcard is only a couple of KLOCs while Hasura & co large and complex tools developed by teams and backend by big VC money.

You can read Wildcard's whole documentation in 10 minutes. Reading Hasura's entire documentation is much larger than Wildcard's.

It speaks volumes about how much simpler Wildcard is in comparison to Hasura.

It's weird to say that Hasura is as simple as Wildcard.

> the client doesn't have to know if it's talking to a relational database, a Redis cache, a REST data server, an in-memory data model, or whatever.

Such decoupling is mostly useful for very large projects. The vast majority of apps out there don't need such decoupling. Separation of concern is important, but based on concern not on technology.

> Your tool on the other hand is just another vendor-specific ORM or manual query engine.

It's weird to call an RPC implementation an "ORM" or "query engine". I'm not sure how an Software Engineer is able to mix up "RPC" with "ORM".

Honestly, your whole post is weird to me, I'm not sure what your motive is. You seem to try to put down an open source project that is being developed by someone in his free time and without any remuneration. That's disgusting and without taste. If you only have a lack of tact then I apologize for my words.

Just to be clear I do like many aspects of Hasura. The problem is that, 95% of the time, GraphQL is not being used in the right situations. GraphQL when used correctly is a lovely tool. (Basically GraphQL = generic API for third parties. If you don't need third parties to access your data then you don't need GraphQL.)

Re: Hasura raises $9.9M to simplify GraphQL

#189

Earlier quoted context omitted.

I've always been a huge fan of the Graphile (aka postgraphile) approach. It's just an open-source library, that you can run as a binary when you're just getting started. But when you start getting deep in production territory, it's extensively pluggable and you can gradually swap everything out for your own code, contribute/fork if you need (it's just TS), etc. Full control. I love the Hasura folks too, and they're a…

Benjie is legit awesome. We (storyscript) sponsor him and he's unbelievably valuable. I definitely abuse his time and he's always happy to help.

wow, just yesterday i heard of storyscript and now i'm seeing you in an unrelated HN post. small world!

Re: Hasura raises $9.9M to simplify GraphQL

#190

Earlier quoted context omitted.

I've been working on GraphQL services since 2015. I worked on the design of the precursor to postgraphile; it was called postgraphql. Hadn't heard of Hasura before today, but it looks interesting. The primary complaints I hear from others about GraphQL are observability and the learning curve for devs who are new to it. I think these projects add a lot of value with tools like the GraphQL playground (similar to Graph…

Curious to know what you think of the React + RPC (e.g. https://github.com/reframejs/wildcard-api ) + PostgreSQL stack in comparison to React + Relay + GraphQL + PostgreSQL? RPC tightly couples frontend and backend. Decoupling is usually only needed for (very) large applications; while getting there you migrate from RPC to GraphQL.

It looks like a nice library. It might be good as a learning tool. I'm not sure what kind of use-case I would want it for, maybe a small game? It looks similar to how I've done smaller/demo/mock-up APIs for frontend apps. I like the simplicity.

I think if I was going to be deploying a real database (PostgreSQL), I'd want to do things with authorization and network configuration; at which point I'd be dealing with enough stuff around the user profile that I'd want my preferred query and mutation design (GraphQL + Relay).

If at any point you're going to be fetching data containing long lists, I'd also prefer to be working with GraphQL and Relay because the design is well thought-out for doing filtering, pagination, and caching.

Decoupling is good any time you want to allow different parts to change independently. Migrating architectures can take a significant amount of effort, but it just depends what you want to accomplish.

Post reply on HN