Should I use a single complex GraphQL query or several smaller ones?
#1
I'm trying to decide between using a single, complex GraphQL query or breaking it down into multiple simpler ones for our product detail page. I keep going back and forth on whether the performance hit from a large, nested query is worse than the network chatter of several smaller, sequential calls.
Reply
#2
I tried one big query for a product page and the first load slowed to about 900 ms even with cache warming. The payload pulled in lots of fields and the render still lagged.
Reply
#3
We split into two calls with GraphQL the core data and then media and the time to first byte dropped by about a third but the total requests rose and mobile data costs went up.
Reply
#4
Do you think the real issue is data shape or the number of round trips and would a single cleaned query solve it?
Reply
#5
One more angle I chased briefly was a batch endpoint for related data but we pulled back when the payload kept shifting with promos and it felt brittle.
Reply


[-]
Quick Reply
Message
Type your reply to this message here.

Image Verification
Please enter the text contained within the image into the text box below it. This process is used to prevent automated spam bots.
Image Verification
(case insensitive)

Forum Jump: