Re:GraphQL Is a Trap?
by spion on Friday May 06, 2022 @01:20PM
(#31287654)
see https://www.apollographql.com/docs/apollo-server/performance...
[ Parent
| on HN ]
> see https://www.apollographql.com/docs/apollo-server/performance...
Sorry, that doesn't cut it at all. Far from it. Being able to cache a response is not the same thing as optimizing queries that hit your database. Being able to cache a response means not having to hit your database to begin with, and save up on things like traffic going into your database, and round trip time.
With REST APIs I can get a web service to return responses that are HTTP cacheable, put a nginx instance between the ingress controller and the web service, and serve responses to REST clients without even touching the web service that provides the REST API. I can even deploy nginx instances in separate regions.
What's GraphQL's response to this basic usecase?
Did you take the time to read the article? I'll try a more specific link to a section https://www.apollographql.com/docs/apollo-server/performance...