BullMQ + TRPC
Curious how to configure BullMQ with TRPC correctly. Currently I have the queue, queueevents, and the worker inside a router. Though it works, I have a feeling its not the right approach?
D
Dani;•340d ago
I don't think you should have those in a router. BullMQ should be defined outside of tRPC, then you'll be able to queue new jobs from your tRPC routers
B
b•340d ago
Ya, I actually moved BullMQ into its own node sever. Rather not have long-lasting processes like this in a NextJS app
D
Dani;•339d ago
Fair enough, i mean you can have it in the same node process using a custom nextjs server, you just can’t go serverless if you do that
4.8KMembers
View on DiscordMore Posts
Trpc refetches all of the queries when i run a mutationIm running node 16.15.0 with Pnpm
When i run a mutation for some reason all of the queries get refettRPC Client on NodeJS server keeps complaining that no fetcher has been configuredHey, I want to create a tRPC setup where I have one server (works fine) and then a client which is cBest Practice to Fetch a Query OnDemandWhat's the best practice to fetch a query on demand?
I don't have the context for the query's inputOutput Response ShapeI'm wondering, is the output response shape locked in, or can we modify it in any way? For example:
Need help```js
import {initTRPC} from '@trpc/server';
import * as trpcNext from '@trpc/server/adapters/next';useQuery hook modify data on fetch.Hello is it possible to modify the data that is fetched with useQuery hook in tRPC basically im storAccepting a DecoratedProcedure with inputs and outputs that extend some given typesIs there any way to accept a DecoratedProcedure that extends { mutate: Resolver<TProcedure> } where useEffect and useMutation error about conditional rendering of hooksI am using t3 stack with tRPC, and I am trying to mark all emails as seen when the page loads by usi