News for hackers. Stuff that matters.
Re:Lessons learned from running GraphQL by n_e on Saturday September 25, 2021 @05:46AM (#28651826)
> The fact that GraphQL allows all these permutations in the queries is the root of the problem. It's not something which can be solved or optimized within GraphQL.

Common ways to solve that are to whitelist the allowed queries or to cache at the resolver level instead of the query level.

Re:Lessons learned from running GraphQL by jensneuse on Saturday September 25, 2021 @07:17AM (#28652192)
I'd like to argue against that. Yes, whitelisting is a solution. But Caching at the Query level can be extremely efficient. I'm the founder of WunderGraph and we're doing it like this. We turn GraphQL Operations into REST/JSON-RPC Endpoints, allowing them to be cached by CDNs, Browsers, etc... https://wundergraph.com/docs/overview/features/edge_caching