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

I'm impressed by the numbers, but I'm having some doubts about the general idea of exposing your database via GraphQL.

It seems to expose your internal data structures, and any change to those will immediatly impact that public GraphQL API. Also it seems that this approach would only work well for applications without any business logic, or with business logic solely implemented in the database. At least the applications I've been working on wouldn't fall into this category.

But in any case, impressive work and demos!



You aren't limited to a single database though, so you could stream your main database to a public facing one with a more stable structure.

But you'd have to handle changes through another API, or at least route them differently, and then worry about consistency so probably not ideal for all business cases.


True!

We’ve added event triggers to Hasura to kind of support this pattern via Hasura itself. So you can create “action” tables that basically have a log of request data (a mutation inserts an action). Hasura will then call an event handler which can run with the action data, user session information, related data in case there are any relationships etc. This handler can then go update the tables that can be queried from.

Ofcourse, if the eventing system is in-order / exactly once quite a few use-cases become feasible ;)




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

Search: