Massukka
Massukka
TtRPC
Created by Massukka on 1/26/2024 in #❓-help
Is there something to be done about trpc errors and solidjs/seroval?
Basically if you throw error in trpc route, solidjs seroval fails to serialize it during SSR. I don't know much about techinal details of this error, but do you think something could be done about this error?
2 replies
TtRPC
Created by Massukka on 10/10/2022 in #❓-help
SSG on nextJS when appRouter is made with fastify adapter?
export const getStaticProps: GetStaticProps = async () => {
const ssg = await createSSGHelpers({
router: appRouter //This app router is in fastify
ctx: await createContext(),
});

await ssg.fetchQuery("personalStats");
await ssg.fetchQuery("ageOfOnsetPsychosisByGender");
await ssg.fetchQuery("PsyLengthByGender");

return {
props: {
trpcState: ssg.dehydrate(),
},
revalidate: 1,
};
};
export const getStaticProps: GetStaticProps = async () => {
const ssg = await createSSGHelpers({
router: appRouter //This app router is in fastify
ctx: await createContext(),
});

await ssg.fetchQuery("personalStats");
await ssg.fetchQuery("ageOfOnsetPsychosisByGender");
await ssg.fetchQuery("PsyLengthByGender");

return {
props: {
trpcState: ssg.dehydrate(),
},
revalidate: 1,
};
};
Anybody used next SSG with fastify adapter? If try to import appRouter from fastify to getStaticProps router in nextjs, I get webpack loader problems. How should I approach getting this to work?
1 replies