I created this small example to show my issue:
https://codesandbox.io/s/ovw0m6yl4z
Basically, every time I re-render the component and useQuery fetches new data, the data object is set to {} while loading is true.
How can I preserve the previously fetched data while I load new data?