anthonylin198
anthonylin198
TTCTheo's Typesafe Cult
Created by anthonylin198 on 5/24/2023 in #questions
tRPC on the Edge?
This worked with Kysely! Successfully got my routes to the edge
12 replies
TTCTheo's Typesafe Cult
Created by anthonylin198 on 5/24/2023 in #questions
tRPC on the Edge?
Prisma can't run on the edge, need to use something like Drizzle or Kysely. But I also don't think tRPC works either, so looking for solutions haha
12 replies
TTCTheo's Typesafe Cult
Created by anthonylin198 on 5/24/2023 in #questions
tRPC on the Edge?
Edge doesn’t work with Prisma I think. I switched to kysely
12 replies
TTCTheo's Typesafe Cult
Created by anthonylin198 on 5/24/2023 in #questions
tRPC on the Edge?
Yeah I’ve seen some stuff with teh fetch adapter as well. I’ll give it a go too thanks!
12 replies
TTCTheo's Typesafe Cult
Created by anthonylin198 on 2/20/2023 in #questions
Recommendations on feature flag library for t-3 app?
Appreciate you guys for the suggestions!
6 replies
TTCTheo's Typesafe Cult
Created by anthonylin198 on 2/20/2023 in #questions
Recommendations on feature flag library for t-3 app?
Nice! Spun this up and got it working as I needed for the time being
6 replies
TTCTheo's Typesafe Cult
Created by nickparks on 2/13/2023 in #questions
Using dynamic Param slug in TRPC query
Haha it happens 😆 , I'm also fairly new to TS
10 replies
TTCTheo's Typesafe Cult
Created by nickparks on 2/13/2023 in #questions
Using dynamic Param slug in TRPC query
I recently did something like this:
const ApplicationPage = ({ pageProps: { assessmentId } }: PageProps) => {


const { data: applicationData } =
api.applicantApplication.getApplicationData.useQuery(assessmentId);

console.log("application data", applicationData);

return (
<div>
<div>{applicationData?.title}</div>
</div>
);
};
const ApplicationPage = ({ pageProps: { assessmentId } }: PageProps) => {


const { data: applicationData } =
api.applicantApplication.getApplicationData.useQuery(assessmentId);

console.log("application data", applicationData);

return (
<div>
<div>{applicationData?.title}</div>
</div>
);
};
10 replies
TTCTheo's Typesafe Cult
Created by nickparks on 2/13/2023 in #questions
Using dynamic Param slug in TRPC query
May not be what you're looking for, but if you get the slug from the server side using the GetServerSidePropsContext type works.
export function getServerSideProps(context: GetServerSidePropsContext) {
const id = context?.params?.id;

return { props: { pageProps: { assessmentId: id } } };
}
export function getServerSideProps(context: GetServerSidePropsContext) {
const id = context?.params?.id;

return { props: { pageProps: { assessmentId: id } } };
}
10 replies
TTCTheo's Typesafe Cult
Created by Will on 1/26/2023 in #questions
Updates from mutation responses with trpc?
@thisisnotawill did you return data from your endpoint?
11 replies