Hacker News new | ask | show | jobs
by Geee 3936 days ago
Ugh.. My comment was meant in the Relay thread, but anyway, it sounds like Relay/GraphQL is designed to not fetch anything that isn't actually rendered. In my own SPA apps, I very frequently over-fetch to reduce latency. I was hoping there would be a nice compatible way to manage this use case.

I'm not too familiar how this works, but maybe it's enough to query the additional data in parent component or somewhere and it just works.

2 comments

To expand on lgas' answer, you can certainly over fetch with Relay/GraphQL if your product needs to.

The intent is to prevent accidental/unintentional over or under fetching that leads to bugs or poor experiences.

It fetches whatever you ask for.