feld on Nostr: > If you add query parameters to determine what fields get returned, those become ...
> If you add query parameters to determine what fields get returned, those become separate requests so they can't be cached together.
Yes this would waste more memory on your caching layer, but it's still possible. Keep the TTLs low enough and it shouldn't matter much.
> With REST APIs, I regularly end up making THOUSANDS of individual requests to get all the information that I need
Well, you should be working with your backend team to design APIs that don't require that, but I understand that sometimes you're screwed because "that team" doesn't have the "resources" to work on your problem. That's why this smells like "GraphQL is here to fix the biggest problem with corporate silos"
> while I can pack everything from GQL APIs into a SINGLE request
Like the comments in my HN link point out, now you have a different problem: preventing DoS attacks or queries that are crazy expensive and can cause significant load/crashes of your backend. So you have to add an entire security layer on top of GraphQL to limit size of queries and size of responses because it's as evil as handing out unrestricted SQL access to your backend database(s)... we're just moving the work and responsibility around, really.
Yes this would waste more memory on your caching layer, but it's still possible. Keep the TTLs low enough and it shouldn't matter much.
> With REST APIs, I regularly end up making THOUSANDS of individual requests to get all the information that I need
Well, you should be working with your backend team to design APIs that don't require that, but I understand that sometimes you're screwed because "that team" doesn't have the "resources" to work on your problem. That's why this smells like "GraphQL is here to fix the biggest problem with corporate silos"
> while I can pack everything from GQL APIs into a SINGLE request
Like the comments in my HN link point out, now you have a different problem: preventing DoS attacks or queries that are crazy expensive and can cause significant load/crashes of your backend. So you have to add an entire security layer on top of GraphQL to limit size of queries and size of responses because it's as evil as handing out unrestricted SQL access to your backend database(s)... we're just moving the work and responsibility around, really.