Hobbs
Explore posts from serversTTCTheo's Typesafe Cult
•Created by Hobbs on 8/13/2024 in #questions
T3 Next Auth / TRPC Documentation is outdated
The next auth docs are wildly different regarding folder structure than t3 app especially between v4 and v5. It seems from the docs t3 is fairly opinionated about the folder structure and how it integrates trpc/middleware so having an idea of how you had linked everything would be helpful since the create t3 app doesn't work out of box with drizzle
5 replies
TTCTheo's Typesafe Cult
•Created by Simon Verhoeven on 8/11/2024 in #questions
t3 tRPC - CTX is undefined
I think you may be looking for using something like the
privateProcedure
instead of the publiceProcedure
4 replies
TTCTheo's Typesafe Cult
•Created by Simon Verhoeven on 8/11/2024 in #questions
t3 tRPC - CTX is undefined
did you end up figuring it out @Simon Verhoeven ?
4 replies
Correct tRPC implementation (NextJS AppDir)
Another thing to note is that if you are using server actions that those can't run in parallel (you might want to double check to confirm) but I recall that being the case. So basically I try to stick to using server actions only for mutations
55 replies
Correct tRPC implementation (NextJS AppDir)
For the loading times it sounds like it has to do with your refetchInterval/staleTime
If you are using the hydration pattern you can preFetch/PreHydrate your data as well and that can make it appear quicker
55 replies
Correct tRPC implementation (NextJS AppDir)
So i'm basically importing my
trpc
from /utils/trpc.ts then using that to make my requests however I have no clue how you would differentiate this from a server vs client (i'm using the createTRPCNext
method , does this handle if it's client vs server on it's own or did you by any chance go down the rabbit hole of setting up a createCallerFactory
? haha55 replies
Correct tRPC implementation (NextJS AppDir)
What's confusing to me is in the pages router you'd have a
withTRPC
that wraps the app router / App itself
In app directory from what I understand is we create that kind of psuedo provider and combine it with a query provider to wrap the application and both of those use local state for the queryClient/trpcClient55 replies