BeBoRE
BeBoRE
TtRPC
Created by Peform on 8/7/2024 in #❓-help
useQuery `onSuccess` callback depreciated
5 replies
TtRPC
Created by Peform on 8/7/2024 in #❓-help
useQuery `onSuccess` callback depreciated
Read the react query docs about its depreciation
5 replies
TtRPC
Created by Bytes on 7/20/2024 in #❓-help
How do I return a plain text in trpc?
You’d have to experiment
8 replies
TtRPC
Created by Bytes on 7/20/2024 in #❓-help
How do I return a plain text in trpc?
You’d might be able to do it by ending the response yourself with a procedure, but you’d probably end up crashing tRPC
8 replies
TtRPC
Created by Bytes on 7/20/2024 in #❓-help
How do I return a plain text in trpc?
There is no solution in tRPC for that
8 replies
TtRPC
Created by Alan on 7/18/2024 in #❓-help
How can I set a Cookie from the server (for the login)?
// created for each request
const createContext = ({
req,
res,
}: trpcExpress.CreateExpressContextOptions) => ({}); // no context
type Context = Awaited<ReturnType<typeof createContext>>;
const t = initTRPC.context<Context>().create();
// created for each request
const createContext = ({
req,
res,
}: trpcExpress.CreateExpressContextOptions) => ({}); // no context
type Context = Awaited<ReturnType<typeof createContext>>;
const t = initTRPC.context<Context>().create();
4 replies
TtRPC
Created by Alan on 7/18/2024 in #❓-help
How can I set a Cookie from the server (for the login)?
4 replies
TtRPC
Created by Alan on 7/18/2024 in #❓-help
How can I set a Cookie from the server (for the login)?
Your t needs to be passed the typedef of your context
4 replies
TtRPC
Created by Merlin on 2/26/2024 in #❓-help
React type errors because of backend
You good?
7 replies
TtRPC
Created by seven on 7/7/2024 in #❓-help
client server counication with webSockets
You can only listen to subscriptions, but the wsLink does allow for you to call mutations over WebSocket
12 replies
TtRPC
Created by mwinel on 4/30/2024 in #❓-help
Running Websockets/Subscriptions with Fetch / Edge Runtimes Adapter
@Emmytobs you an now do subscriptions over http with SSE using the httpSubscriptionLink
16 replies
TtRPC
Created by PinkiePie on 6/14/2024 in #❓-help
Websocket connects even without any subscriptions
Enable lazy in the ws client settings
6 replies
TtRPC
Created by seven on 7/7/2024 in #❓-help
client server counication with webSockets
The wsLink supports mutations, it should stay open. There is an option for the ws client to be lazy, but I believe that's not enabled by default.
12 replies
TtRPC
Created by balakay on 7/9/2024 in #❓-help
UseQuery iterator not working for me
What link are you using? You should use the unstable_httpBatchStreamLink.
3 replies
TtRPC
Created by mithrandir on 7/9/2024 in #❓-help
multiple subscriptions in client side causing latency and failing to reload/redirect
The page becomes completely unresponsive due to the subscriptions?
14 replies
TtRPC
Created by Jorge on 7/8/2024 in #❓-help
Endpoints lose Input and Output Types on tRPC Client
Looks like you don't have strict enabled in your TypeScript config
5 replies
TtRPC
Created by Jorge on 7/8/2024 in #❓-help
Endpoints lose Input and Output Types on tRPC Client
Have you read the FAQ?
5 replies
TtRPC
Created by P.S.Nikhil on 12/15/2023 in #❓-help
How to cache trpc server request next.js app router
24 replies
TtRPC
Created by P.S.Nikhil on 12/15/2023 in #❓-help
How to cache trpc server request next.js app router
You cannot set Cache-Control headers in next.config.js for pages or assets, as these headers will be overwritten in production to ensure that responses and static assets are cached effectively.
Doesn't say anything about the app router and API routes.
24 replies
TtRPC
Created by mithrandir on 7/9/2024 in #❓-help
multiple subscriptions in client side causing latency and failing to reload/redirect
Please elaborate
14 replies