Re:SwiftGraphQL – A GraphQL client that lets you forget abou...
by dmitriid on Monday February 22, 2021 @10:43AM
(#26225777)
It is more difficult. With REST you know ahead of time which data you need, and you can optimise it as much as you can. With GraphQL at any given point in time you have no idea what the request is. Dataloaders solve it to some extent, but not much.
Re:SwiftGraphQL – A GraphQL client that lets you forget abou...
by mikecaulley on Monday February 22, 2021 @10:59AM
(#26225982)
Of course, you are building something that is much more powerful. If you intend every possible GraphQL operation to perform perfectly, it'll take more development effort. Though if you optimize for only the most likely cases, the effort is not much greater.
Re:SwiftGraphQL – A GraphQL client that lets you forget abou...
by dmitriid on Monday February 22, 2021 @05:48PM
(#26231716)
> Though if you optimize for only the most likely cases, the effort is not much greater.
That's why most discussions involving complexities of GraphQL inevitably devolve into: "in production we only allow a subset of queries". Because actually implementing GraphQL as it's specified and marketed is quite an undertaking.
There are different things to look out for; like handling n+1 (https://shopify.engineering/solving-the-n-1-problem-for-grap...) queries, but nothing that I can say is too difficult.