News for hackers. Stuff that matters.
Re:GraphQL kinda sucks by mattbillenstein on Saturday August 06, 2022 @01:48PM (#32370115)
Why do you hate it? What tooling are you using? I found it fairly painless in Python - Graphene/Flask.
Re:GraphQL kinda sucks by matsemann on Saturday August 06, 2022 @02:29PM (#32370434)
If all you do is expose simple models, it's fine. But then not much different than an auto-generated REST-api. But if you want to query deep, list of childrens etc you quickly get into queries that are very hard to write on the backend (n+1 issues quickly pop up etc). To solve those you need to write complicated loaders, which all should be very general in nature and thus you can't rely on two fields backed by the same data sharing a query without doing something special. Which is much more hassle than just writing whatever join you want for a tailored endpoint.
Re:GraphQL kinda sucks by mattbillenstein on Sunday August 07, 2022 @10:40PM (#32381961)
The N query is the general case which devolves to the scaler query with a list of ids with only one id...
Re:GraphQL kinda sucks by mabbo on Saturday August 06, 2022 @07:18PM (#32372479)
I joke mostly. Coming from a REST based background it was really foreign and convoluted to me.

Until I understood the point, the organizational decoupling. Then it clicked why it's great.