How to prevent making a query, if id is removed from ids list that is used as cache key - TanStack