Use `select` or return from inside query function?
{ metadata: Record<string, CustomType> }. Often times we only want one of the returned CustomType. The Record is of IDs to CustomType so when we pass in one ID, we only want one returned.Should we be using the
select function to return that one object or can we return it right inside the query function?Using select:
or purely in the query function:
I thought I saw something that we needed to always return
response.data so useQuery could properly handle everything but now I'm not so sure.We are sadly on v3 of react-query still...