Hasura, on the other hand, is good for proper apps where you really want fine, control over a user-facing backend. Hasura makes that fine control easier to attain than ever, but you don't always need that.
Hasura, on the other hand, is good for proper apps where you really want fine, control over a user-facing backend. Hasura makes that fine control easier to attain than ever, but you don't always need that.
Hasura can't implement your business logic. If Hasura is my first-stage backend, that means I need to reinvent a lot of the controls it would provide anyway - auth, graphql APIs to integrate into it, etc - for the servers that can do that business logic.
So it doesn't really feel like a choice between Hasura and a custom backend. You can have a custom backend, or both Hasura and also a custom backend. It's an excellent choice for killing off boilerplate CRUD, though.
You can implement a ton of it in stored procedures and check constraints, which I realize some people don't like, but I really like a lot. But yes, there are limits to what you can do with this, and testing PL/pgSQL or whatever language you use for your procedures is prohibitively difficult.
> but every usage ends up requiring a more fully fledged backend in the mix anyway?
So yes, I agree, if you use Hasura, you will end up with a backend as well. This backend will run your auth (if you don't go a third party route) and your Hasura Actions[0][1], which I think is fine.
> So it doesn't really feel like a choice between Hasura and a custom backend. You can have a custom backend, or both Hasura and also a custom backend. It's an excellent choice for killing off boilerplate CRUD, though.
That's my take, too. Hasura totally kills boilerplate CRUD, adds the ability to do rich GraphQL querying, and my favorite feature—declarative role-based authorization/access control—puts the icing on the cake.
[0] https://hasura.io/docs/latest/graphql/core/actions/index.htm...
Loved that you mentioned PL/pgSQL - consistently impressed by the amount of logic that can be implemented in database using that or plv8 or its cousins. I personally have feels about why that may be a good solution for a lot of small-to-mid-to-large size build outs.
But yeah, in terms of logic we definitely expect you're going to need at least one other service for auth in the stack (for simplicity that service could also be used for any logic-based work as well).
One of the things we pride ourselves on is being non-opinionated about the logic side of the stack and trying to create as many 'escape-hatches' as possible.
Want to use db eventing? - We can event out to an external service.
Setup a custom action? - We can toss those arguments out to an external service and return a response.
Want to do some magic™ using other GraphQL tooling like Prima or Graphene? You can mesh those in with remote schemas.
We really want to build a tool that helps onboard you into the GraphQL ecosystem, but then scales with you as your stack becomes more complicated.
Just create a new test database, populate it with test data, call the function with test inputs and assert that the return value and the SQL dump of the resulting state of the database are what you expect.
For sure, but might be too heavy depending on the specifics of the use-case. "If you can get away with" was my main point.