xdxd#5555 / hanya
xdxd#5555 / hanya
TtRPC
Created by xdxd#5555 / hanya on 8/17/2023 in #❓-help
Queries work but mutations do not
Small update, I did some logging in Koa to see if Koa's getting the request at all. I see both the query request and the mutation request going in. So that's good... But my logging in the mutation procedure never gets hit. Seems like something goes wrong with the Koa middleware step?
5 replies
TtRPC
Created by xdxd#5555 / hanya on 4/23/2023 in #❓-help
ECONNREFUSED with TRPC call on Vercel
Thanks for the help btw
13 replies
TtRPC
Created by xdxd#5555 / hanya on 4/23/2023 in #❓-help
ECONNREFUSED with TRPC call on Vercel
Guessing you mean these settings? I actually didn't touch them but I will try changing this up
httpBatchLink({
url: `${getBaseUrl()}/api/trpc`,
}),

const getBaseUrl = () => {
if (typeof window !== "undefined") return ""; // browser should use relative url
if (process.env.VERCEL_URL) return `https://${process.env.VERCEL_URL}`; // SSR should use vercel url
return `http://localhost:${process.env.PORT ?? 3000}`; // dev SSR should use localhost
};
httpBatchLink({
url: `${getBaseUrl()}/api/trpc`,
}),

const getBaseUrl = () => {
if (typeof window !== "undefined") return ""; // browser should use relative url
if (process.env.VERCEL_URL) return `https://${process.env.VERCEL_URL}`; // SSR should use vercel url
return `http://localhost:${process.env.PORT ?? 3000}`; // dev SSR should use localhost
};
13 replies
TtRPC
Created by xdxd#5555 / hanya on 4/23/2023 in #❓-help
ECONNREFUSED with TRPC call on Vercel
@nlucas Thanks, yeah that seems to be the problem, but any idea where in the code I need to change this?
13 replies
TtRPC
Created by xdxd#5555 / hanya on 4/19/2023 in #❓-help
Call retries were exceeded with ssg
I'm thinking that if I simply cannot feasibly return 1000 paths from getStaticPaths, I should just use incremental static regeneration and let most pages be built the first time they're served
3 replies