Prisma: Asyncronous Extended Fields
Anyone familiar with any better way to accomplish the equivalent of
field resolvers
with prisma?
The Ask
I need an async field returned with each user
The Scenario
Say I want to findMany
on users
but I want a likeCount
and followCount
fields returned with each result.
The expand
api looks to be on the right track but it looks like its unable to perform asynchronous computes for additional fields.
Such as if I wanted to add an async field called likeCount
to user
which would be returned on each user result.
I know I can just _count likes
on user
for this example. This is simplified for an example 0 Replies