How to use react-query for a request with filters - TanStack