TLDR Web Dev · ARTICLES & TUTORIALS

FROM 20S DOWN TO 1S: HOW WE SHAVED OFF 19S FROM OUR GRAPHQL API QUERIES

mingyang-li.medium.com3 min read

Summary from the TLDR Web Dev newsletter

A team was looking to optimize GraphQL query time and explored several options like pagination, reducing the number of nested queries, caching, filtering, and more. However, one approach was the most effective and reduced large GraphQL query time from 20 seconds to 1 second. They did this by optimizing SQL queries against the database and it’s very simple - instead of using SELECT *, specify the columns you want. This will reduce payload size and reduce database overfetching.