rykuno
Explore posts from serversTTCTheo's Typesafe Cult
•Created by rykuno on 5/7/2023 in #questions
Next-Auth Session in Server Function
Trying out the new app directory with an example project and ran into issues with accessing the user session within a server function via
getServerSession
Calling this code from an action
handler within a form yields the following error Method expects to have requestAsyncStorage, none available
.
Is there anyone who has successfully gotten this to work?29 replies
TTCTheo's Typesafe Cult
•Created by rykuno on 1/25/2023 in #questions
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 1 replies
TTCTheo's Typesafe Cult
•Created by rykuno on 1/17/2023 in #questions
Prisma `clientExtensions` Preview Feature Breaks Types
Enabling the
clientExtensions
preview feature in prisma.schema causes trpc routers to break all typesatefy.
Anyone mess with this yet?4 replies