News for hackers. Stuff that matters.
Re:GraphQL Query Generator by hurricaneSlider on Wednesday July 22, 2020 @09:04AM (#23916469)
Have you looked at Hasura (hasura.io)? Allows you to carefully expose your database as an API, while allowing you to build serverless endpoints for validation, business logic and side effects. Bakes in authorization as a first class concern. There are some other similar alternatives that do much the same.

Think it's a mistake to consider GraphQL as a drop-in replacement for REST, writing a vanilla GraphQL server is indeed quite arduous as there is a lot of important concerns like auth that you don't get out the box.

But if you're just wanting to expose your database in a controlled and secure manner, with a smattering of business logic, think some of the technologies that have evolved around GraphQL like Hasura and PostGraphile can make it a joy to use.

Think the wonder is that the schema definition language/schema introspection wasn't just tacked on at the end (unlike REST w/ Swagger and OpenAPI) so all these tools have developed around the tech. There is also a bit less of an object relational mismatch than in REST.

Re:GraphQL Query Generator by w1 on Wednesday July 22, 2020 @11:04AM (#23917783)
Hasura has been a godsend for me. I'll be using it for all my MVPs for the foreseeable future.
Re:GraphQL Query Generator by cargoshipit on Wednesday July 22, 2020 @12:32PM (#23918760)
The biggest pains with hasura are managing migrations across a large development team and adding business logic.
Re:GraphQL Query Generator by hurricaneSlider on Wednesday July 22, 2020 @02:24PM (#23920034)
That's fair. I haven't used it in that context.