how to update query data without useEffect - TanStack