Sindre
Sindre
TtRPC
Created by Sindre on 9/9/2024 in #❓-help
Is there any way to know which objects in a list got updated from a useQuery refetch πŸ€”
Or through another API type Have some larger calculations that happen after the list is set that I don’t want to recalculate
2 replies
TtRPC
Created by Sindre on 9/4/2024 in #❓-help
Good patterns for large list querys? Invalidation & refetching gets slow after a mutation
We have several large lists where we invalidate the query after editing an item. What are some good patterns for this? The network lag starts adding up for the customers with more data. Ironically those who use us the most πŸ˜„ Is it "good practice" to edit the list query cache directly in the mutation onSuccess? Or necessary to refactor the list querys to be smaller, through server filters or infiniteQuery? Especially painful in a view where we have two lists where the user can connect items from one list to the items in the other list. Requiring both list queries to be invalidated. Better to make the "connections" mapping its own api procedure and only invalidate that? Or combine all three to one query, set the cache state manualle in the mutation onSuccess?
Kind of a react-query question I know, just wondering if anyone here has faced it. And if it has been written about
5 replies