𝚜𝚗𝚘𝚘𝚣𝚎
𝚜𝚗𝚘𝚘𝚣𝚎
Explore posts from servers
TtRPC
Created by 𝚜𝚗𝚘𝚘𝚣𝚎 on 10/28/2024 in #❓-help
Blob as response
I know this has been mentioned couple of time but does TRPC allow returning a blob on the client from a publicProcedure.
downloadFile: baseProcedure.mutation(async () => {
const response = await ky("api/export", {
headers: {
Authorization: `Bearer ${(await cookies()).get("token")?.value}`,
},
}).blob();

return response;
}),
downloadFile: baseProcedure.mutation(async () => {
const response = await ky("api/export", {
headers: {
Authorization: `Bearer ${(await cookies()).get("token")?.value}`,
},
}).blob();

return response;
}),
This works when used with server actions from this blog https://trpc.io/blog/trpc-actions I wanted to ask if that's the case with publicProcedures too.
11 replies
TtRPC
Created by 𝚜𝚗𝚘𝚘𝚣𝚎 on 6/26/2024 in #❓-help
How do I pass FormData from client to the public procedure ?
Whilst being able to pass objects when calling mutate() from react-query's, FormData seems to not work. Logging input from public procedure results to empty object ? Any workaround ?
2 replies
TtRPC
Created by 𝚜𝚗𝚘𝚘𝚣𝚎 on 6/3/2024 in #❓-help
Next 14 app router
Is there any docs for NextJS 14 app router integration ?
22 replies
TTCTheo's Typesafe Cult
Created by 𝚜𝚗𝚘𝚘𝚣𝚎 on 3/11/2024 in #questions
Using Next with an external backend
Hey Theo, I wanted to get your opinion on using next with an external api server knowing that next has its own. In order to take advantage of next app router features do you think its nice using next server as proxy to communicate to those external api servers. And does that mean you will always have 2 round trips back and forth to fetch json data. Im asking this because I know next is built as a full stack framework and not like some framework you would use to communicate with an external server. Thanks for your time.
4 replies