Zion
Zion
Explore posts from servers
TTCTheo's Typesafe Cult
Created by Zion on 3/3/2024 in #questions
What hosting should I use for my server?
I have a nodejs instance (fastify) I need to host, where would be the best place?
5 replies
TtRPC
Created by Zion on 12/29/2023 in #❓-help
tRPC and vite serverless, are there any exmaples?
Now that tanstack router is out I would want to move out of nextjs, but keep the convenience of hosting on vercel with serverless. I saw that theres some vite-vercel plugin (vite-plugin-vercel) for SSG/ISR/serverless functions, but not sure how I would integrate it with tRPC. are there any exmaples for something like that?
21 replies
TtRPC
Created by Zion on 12/20/2023 in #❓-help
Using trpc with fastify server and nextjs client
Hello, is it possible to use fastify for server and have a nextjs client and make use of the SSG / SSR helpers? if so, what adaptor should I use in that case? is there any example for this?
4 replies
TTCTheo's Typesafe Cult
Created by Zion on 11/1/2023 in #questions
Help with inferring output
return ctx.prisma.product.findMany({
include: {
price: {
select: {
contractor: group === "CONTRACTOR",
customer: group === "CUSTOMER",
frequent: group === "FREQUENT",
professional: group === "PROFESSIONAL",
vip: group === "VIP",
visitor: group === "VISITOR",
},
},
},
});
return ctx.prisma.product.findMany({
include: {
price: {
select: {
contractor: group === "CONTRACTOR",
customer: group === "CUSTOMER",
frequent: group === "FREQUENT",
professional: group === "PROFESSIONAL",
vip: group === "VIP",
visitor: group === "VISITOR",
},
},
},
});
I have the following return and I want to infer the types of a single item, before I added the include bit the code worked, but now it gives me an error, how to set it up correctly? https://cdn.discordapp.com/attachments/1169329995487903764/1169329995668279377/image.png?ex=6555026c&is=65428d6c&hm=c861edd451db38375639458bda8d1aaec91421b2c98d364c603b70ef144affe4& https://cdn.discordapp.com/attachments/1169329995487903764/1169330155123114256/image.png?ex=65550292&is=65428d92&hm=06fb15ab6a5a357593f0c51d51358015e45432c031ceec672430f131daf5ef83&
2 replies
TtRPC
Created by Zion on 11/1/2023 in #❓-help
Help with inferring output
No description
9 replies
TTCTheo's Typesafe Cult
Created by Zion on 9/12/2023 in #questions
how to remove all current data from planetscale main branch?
I made a breaking change and need to reset the main branch in order to deploy it, how to do it?
2 replies
TTCTheo's Typesafe Cult
Created by Zion on 9/5/2023 in #questions
Using pusher with T3
Is there a guide on how to setup pusher with T3 correctly with context? I know that theres zapdos but it uses deprecated stuff from zustand, is there any newer solution?
4 replies
TtRPC
Created by Zion on 8/15/2023 in #❓-help
Get object type using UseTRPCQueryResult
this code
type playlistOutputData = UseTRPCQueryResult<
inferRouterOutputs<AppRouter>["notifications"]["getUserNotifications"],
TRPCClientErrorLike<AppRouter>["data"]
>["data"];

type InviteNotificationProps = {
notification: playlistOutputData;
};
type playlistOutputData = UseTRPCQueryResult<
inferRouterOutputs<AppRouter>["notifications"]["getUserNotifications"],
TRPCClientErrorLike<AppRouter>["data"]
>["data"];

type InviteNotificationProps = {
notification: playlistOutputData;
};
gives me an array of objects, I want to get the type only of the object and not the array of it, to have a component for it, how can I do it?
3 replies
TTCTheo's Typesafe Cult
Created by Zion on 8/5/2023 in #questions
Pusher with trpc
I'm making a t3 app and I want to use pusher channels, How can I use it with trpc for the channel autherization? I need to run checks using prisma and I need the context trpc provides to get data from the database to see if the user should be able to connect to a pusher channel
2 replies
TTCTheo's Typesafe Cult
Created by Zion on 8/3/2023 in #questions
Fetch from external API, Client or Server?
If I want to fetch from an external API (in my case, Spotify's api), should I do it from the client using tanstack query or make a trcp api that fetches it from there and then use my trpc api in the client? (using t3)
9 replies
TTCTheo's Typesafe Cult
Created by Zion on 8/1/2023 in #questions
submitting form results in page reload/url change t3+react-hook-form+shadcn
I'm trying to build a form using react hook form and shadcn form component, but it keeps reloading the page after submit and add the "?username=" to the url (which makes it ignore the validation since it just redirects the url), I copy pasted the same code as shadcn has on his website for testing, still does it, cant figure out the issue. anyone knows how to fix it?
58 replies
TTCTheo's Typesafe Cult
Created by Zion on 7/30/2023 in #questions
Project Idea using T3 stack
I'm pretty new to T3, I built a todo list app using it and now I want to take it to the next step, anyone has an idea for a more advanced project to really get my hands dirty with T3? I already built an ecommerce website (not using T3, but with Nextjs), so I would want to build something else.
6 replies