isaac_way
isaac_way
Explore posts from servers
TTCTheo's Typesafe Cult
Created by isaac_way on 5/6/2023 in #questions
"PrismaClient is unable to be run in the browser" in Next.js API route
9 replies
TtRPC
Created by isaac_way on 4/18/2023 in #❓-help
"This is likely not portable" error
16 replies
TTCTheo's Typesafe Cult
Created by isaac_way on 3/4/2023 in #questions
NextJS Element Type Invalid when importing Icon components?
2 replies
TtRPC
Created by isaac_way on 2/11/2023 in #❓-help
createCaller Dependency Injection in Middleware ctx ?
createCaller makes it really easy to inject dependencies via anything that's created during the createContext function:
router.createCaller({ someClient: mockClient});
router.createCaller({ someClient: mockClient});
However, some times it makes sense to add dependencies in middlewares that are only used by a subset of the procedures. For example if I had a twilioClient that is only used by my authorizationRouter , it could make sense to supply that dependency via middleware instead of the createContext function. Is there anyway to inject dependencies into a middleware versus just the root createContext?
1 replies
TtRPC
Created by isaac_way on 1/31/2023 in #❓-help
Is it normal to separate resolvers from routers?
Wondering if it's common and/or whether it's a good idea to attempt to separate procedures from the routers... I know there' a lot of extra explicit typing required with separation and wasn't sure what other people are doing
5 replies
TtRPC
Created by isaac_way on 1/28/2023 in #❓-help
Multiple Clients/Services In tRPC Context
I know it's typical to pass around the prisma client in the trpc context, is the same true for other services/clients as well? IE a twilio or sendgrid client
4 replies
TTCTheo's Typesafe Cult
Created by isaac_way on 12/28/2022 in #questions
VSCode - prevent annoying highlighting
2 replies
TtRPC
Created by isaac_way on 12/22/2022 in #❓-help
Any typescript chads able know if it's possible to map a type to another type w generics
3 replies