MadaShindeInai
MadaShindeInai
TtRPC
Created by DINO on 9/1/2024 in #❓-help
How do I create a React/Node full-stack project with tRPC?
I meant https://create.t3.gg/ T3-app setup. Just decouple NextJs from there and replace it with Remix 🙂 I may be wrong, but Idea is that you need to have both FE and BE part in your app (in the same repo). You can achieve it with Fullstack framework or maybe React + SST framework.
9 replies
TtRPC
Created by DINO on 9/1/2024 in #❓-help
How do I create a React/Node full-stack project with tRPC?
You can use Create-T3-app to create already configured app. If NextJS if not framework of your choise, you can use this setup as example.
9 replies
TtRPC
Created by brumbrum_brum on 8/17/2024 in #❓-help
Procedures with paramters.
I'm doing this 🙂 But you can check T3-app + Clerk.io integration example. They pass Clerk auth there.
9 replies
TtRPC
Created by brumbrum_brum on 8/17/2024 in #❓-help
Procedures with paramters.
You can pass any data to context and then access it in procedure
9 replies
TtRPC
Created by MadaShindeInai on 8/17/2024 in #❓-help
Prefertch() privateProcedure (Clerk) in gSSP
Ah, I needed to pass "auth" from gSSP to prefetchHelper. Works.
type getPrefetchHelperArgs = {
auth: Parameters<typeof createInnerTRPCContext>[number]["auth"];
};
export const getPrefetchHelper = ({ auth }: getPrefetchHelperArgs) => {
const prefetchHelper = createServerSideHelpers({
router: appRouter,
ctx: createInnerTRPCContext({ auth }),
transformer: superjson, // optional - adds superjson serialization
});
return prefetchHelper;
};
type getPrefetchHelperArgs = {
auth: Parameters<typeof createInnerTRPCContext>[number]["auth"];
};
export const getPrefetchHelper = ({ auth }: getPrefetchHelperArgs) => {
const prefetchHelper = createServerSideHelpers({
router: appRouter,
ctx: createInnerTRPCContext({ auth }),
transformer: superjson, // optional - adds superjson serialization
});
return prefetchHelper;
};
3 replies
TtRPC
Created by MadaShindeInai on 5/29/2023 in #❓-help
T3 app tRPC external calls
Upd. found that if using Clerk's webhooks, in opts.req.headers getting 'svix-webhooks/ ..." as user-agent. Will use that is identifier. Thank you.
10 replies
TtRPC
Created by MadaShindeInai on 5/29/2023 in #❓-help
T3 app tRPC external calls
yeah. It become a bit easier. Maybe you also can suggest an easy way to check from what domain request was sent? (To drop everything that was sent not from Clerk)
10 replies
TtRPC
Created by MadaShindeInai on 5/29/2023 in #❓-help
T3 app tRPC external calls
I'm sending a request from Clerk webhook (user.create, and maybe user update later). Maybe there are some kind of more smooth solutions for that?
10 replies