News for hackers. Stuff that matters.
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...