Let’s say you have a dashboard page with projects,...
# prisma-whats-new
b
Let’s say you have a dashboard page with projects, notifications, users. From what I understand the best way is to colocate data with the view component, meaning that each component has its own query instead a big query at the page level and pass down the data, but doesn’t that mean it will affect performance, having 3 network requests instead of one ?
n
@bogdan it's certainly a trade off that you have to personally experiment with. Personally, I oftentimes do bigger queries on the parent component and let the data trickle down. Other people prefer a stricter co-location of data requirements and queries (Relay even enforces it, it's called data masking in the context of Relay). But you can do things like query batching to reduce the performance overhead when using multiple different queries (https://www.graph.cool/blog/improving-performance-with-apollo-query-batching-ligh7fmn38/)
👍 2
b
@nilan cool, thanks for the info, will take a look at batching 👍