Post

So this screen in @onlineornot.com has always been slower than I wanted - around 2.3s(!) to load 10 rows of data from the GraphQL endpoint. It was the first screen I ever built (4+ yrs ago), and I leaned heavily into GraphQL resolvers because I assumed it'd be fast.

0 reposts7 likes

Sorry for the short response, wrote it in the car 😀 I was just wondering what the cost of round-trip w. GraphQL was, compared to server-rendering the entire response.

I've managed to speed it up by ~80% with one simple trick: stop relying on GraphQL. Instead of fetching data resolver-by-resolver, now I fetch all of the data in one chonker of an SQL query.

Next step: move the dashboard over to the existing public REST API. Historically it's been hard to dogfood the public REST API since the whole dash uses GraphQL, so looking forward to that changing.