Vengeance
Vengeance
TtRPC
Created by Vengeance on 5/27/2024 in #❓-help
Send File Back From Procedure
Is there a way to send content like this back from a tRPC procedure?
const headers = {
"Content-Type": "application/vnd.apple.pkpass",
"Content-Disposition": `attachment; filename=${passFilename}`,
"Content-Length": passBuffer.length.toString(),
};

return new Response(passBuffer, { headers });
const headers = {
"Content-Type": "application/vnd.apple.pkpass",
"Content-Disposition": `attachment; filename=${passFilename}`,
"Content-Length": passBuffer.length.toString(),
};

return new Response(passBuffer, { headers });
3 replies
TtRPC
Created by Vengeance on 4/15/2024 in #❓-help
Don't understand cache
How come my API is still getting called when it's already been called with other inputs? Ex: 1. api fetch with 1 as the input 2. api fetch with 0 as the input I expect if the input gets set to 1 again, the API would not be called because we already fetched the result for that Am I doing something wrong or need to set something up? I'm on v11
4 replies
TtRPC
Created by Vengeance on 11/10/2023 in #❓-help
useQuery in App Router?
I have a client component that I want to use useQuery in like in pages router, but only query is available
8 replies
TtRPC
Created by Vengeance on 10/19/2023 in #❓-help
Vercel maxDuration with tRPC
How do you extend extend tRPC timeouts on Vercel? I tried this in vercel.json:
{
"functions": {
"api/trpc/[trpc].ts": {
"maxDuration": 300
}
}
}
{
"functions": {
"api/trpc/[trpc].ts": {
"maxDuration": 300
}
}
}
3 replies
TtRPC
Created by Vengeance on 1/30/2023 in #❓-help
tRPC Call To Server
On the mobile version of my app, in NextJS, the build has to be static so I have to use my hosted web version ass the server url, but when it makes requests it says stuff like no query procedure found, whereas in the web version the request works just fine, I think it's because the static version of the app doesn't request with any cookies. How can I solve this?
5 replies
TtRPC
Created by Vengeance on 12/7/2022 in #❓-help
z.map() as an input
Hi, I have
z.map(z.string(), z.string())
z.map(z.string(), z.string())
as an input, but when I try to pass the map as a query, it refuses to run and I have no clue why. Any ideas?
3 replies
TtRPC
Created by Vengeance on 12/6/2022 in #❓-help
tRPC caching vs Vercel dynamic edge caching
What is the difference, or improvements, on Vercel's dynamic edge caching? tRPC server caching works without it. What is the difference? I don't understand
1 replies
TtRPC
Created by Vengeance on 12/5/2022 in #❓-help
Ignore Errors from batch calls
I have some of my routers throw helpful errors for the client to use in the error message object, but when one of those calls in a batch request, it causes the other calls to fail and never resolves. How do you get around that? I'd rather not add a nullable error field to all my results
7 replies