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.

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.

0 reposts6 likes

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.