tRPCttRPC
Powered by
Jordan (UNCVRD)J
tRPC•4y ago
Jordan (UNCVRD)

Should useQueries be able to 'select' data?

Hi! I'm trying to use the newly implemented
useQueries
useQueries
method to query for multiple items. I need to modify the result, so I'd like to use the
select
select
property. However, by doing so, my results aren't modified to the properties I've selected, it still just returns the whole object.

Image #1 shows my select statement attempting to only grab the
id
id
and
permissionId
permissionId


Image #2 shows the logged result in my browser displaying the full object.

Am I missing something?

My output is correctly typed in TS to only contain
id
id
and
permissionId
permissionId
but the actual values are different 🤔

also note that im just returning my
permission
permission
argument from my
map
map
in the
select
select
image.png
image.png
tRPCJoin
Move Fast & Break Nothing. End-to-end typesafe APIs made easy.
5,015Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

useQueries passing ctx data to splitLink not working
vildantursicVvildantursic / ❓-help
3y ago
Cancel useQueries with single function
vildantursicVvildantursic / ❓-help
3y ago
Type stable "combine" function for "useQueries"
LopaisLLopais / ❓-help
4mo ago