Skip to content

How To Add Include Select Relate Type to useQuery's result. #61

Answered by cqh963852
cqh963852 asked this question in Q&A
Discussion options

You must be logged in to vote

I found one solution.

type SomeType = Prisma.UserGetPayload<typeof query>;
trpc.schema.findManyUser.useQuery<any, SomeType[]>(query)

The SomeType can be defined by user.

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@omar-dulaimi
Comment options

@cqh963852
Comment options

@just-maik
Comment options

Answer selected by omar-dulaimi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants