GraphQL, we don't deserve you
GraphQL was designed to save latency in distributed systems, where queries are around data.
See the cheatsheet - 1 network query with GraphQL replaces 10+ queries for the same data with REST.
But why not to make endpoint like this GET /latest-comments-for-each-post?
1. This is not REST
2. This is very fun 🤣
In the end positive is good, so let it be.
3. Changes in this query or creation of a new query require changes in both parties (consumer and producer). With GraphQL producer doesn't need changes.
❤️ For what I love GraphQL?
1. It nicely maps to DB. It lets exclude garbage CRUD code in data service with tools like AppSync - yes, you can map GraphQL directly to DB. Adding required verifications if required.
2. It supports subscriptions. It's when we can receive updates from the server in real time.
Unfortunately subscriptions usually use Websockets internally, so we have the same problems with horizontal scaling.
🤔Wow, did we find a silver bullet?
Devs can cook GraphQL very seldom. Usually without proper control they work with GraphQL similar to REST - create an endpoint per each resource.
In the end we have the worst parts of both worlds - high latency and high complexity of GraphQL.
So I use GraphQL only when I know Devs can work with it (I don't plan to micromanage them).
Hence I use it very seldom 💔
What's your experience with GraphQL?


