dak.dev
All posts

How I Made GraphQL Feel Like Cheating

From twenty REST calls to one GraphQL gateway.

tech··
Towering server racks forming a corridor stretching toward a luminous cloud-filled sky, blending physical data center infrastructure with cloud computing

At NCSOFT, I served as the sole dedicated backend developer on the Web Team. The work involved sitting between players and numerous internal REST services. I rebuilt that layer as a single GraphQL endpoint using Node.js and TypeScript. The result: players experienced shorter wait times, engineers shipped faster, and shared code decreased by thousands of lines.

The original challenge stemmed from six live games each requiring data from up to eight platform services. Individual screens triggered twenty REST requests, leaving clients idle while waiting for the slowest response. Each new game, event, or patch required re-implementing identical workflows.

The solution became evident: one gateway, zero duplicate calls, and a contract that decoupled front-end teams from platform churn. I built the gateway with Node.js, TypeScript, Express, and graphql-js, minimizing complexity. One endpoint replaced twenty; one schema replaced six API documentation collections.

The performance gains were substantial. Network latency from Gateway to Platform dropped from approximately 120 milliseconds to about 10 milliseconds. DataLoader enabled in-request caching and automatic batching, collapsing 4-6 independent platform calls into single network round-trips per data type. Bandwidth decreased, latency followed, and client code became simpler.

Subsequently, new games, events, or patches required minimal backend modifications—teams could ship client code immediately.