Type error when creating a server-side context 🤔

I am trying to set up my context for TRPC server, and I get the attached error. I am using TRPC v10, Node 20.7.0, TS 5.3.3 and Fastify for the API server. It seems the createHTTPHandler import is only suitable for vanilla HTTP module typings? Thanks for the help! 😄
No description
J
Jack43d ago
This is my context definition:
No description
B
BeBoRE42d ago
You are trying to use CreateFastifyContextOptions where you should be using NodeHTTPCreateContextOptions
J
Jack42d ago
Oh, thanks! Will that not cause any issues though? As I'm using fastify trpc adapter for my project?
AK
Alex / KATT 🐱42d ago
you're importing the standalone adapter, not the fastify adapter
J
Jack42d ago
I couldn't seem to find any fastify equivalent http function from the fastify adapter library
J
Jack42d ago
No description
J
Jack42d ago
I did try fastifyRequestHandler to no avail :( If you don't mind my jumping ahead, is fastify not 100% supported? Thanks for the help Alex!! I'll see if I can spin up a stackblitz repro
J
Jack42d ago
Ah!! This might be me not looking further than my nose! 🤣 I'll try this out, many thanks
J
Jack42d ago
Absolutely perfect! Everything works like a well oiled machine now!! Thanks so much
No description
More Posts
The inferred type of 'trpc' cannot be named without a referenceI'm getting the same error as this post: https://discord.com/channels/867764511159091230/11707368517how to solve thismy query is declared right when i go to this url localhost:3000/api/trpc/gethello i get my output bis it possible to set a response middleware on Vanilla trpc client?I have a vue app and I want to set a middleware on the response, whenever I get a response if I findBug: Setting up cookies not woring when using .input in nextjsHey guys I am trying to set up a cookie with nextjs 14 and trpc. However my cookie is only being setWhat's the best practices around tRPC to negotiate API-versions?In my example I'm thinking about having a native app as a tRPC client and a locally deployed docker Is there a way to pass context or cookies to the client provider?```typescript export default function APIProvider({ children, }: { children: React.ReactNode; })Is there a way to pass context or cookies to the client provider?```typescript export default function APIProvider({ children, }: { children: React.ReactNode; })Why deprecate experimental_standaloneMiddleware?I am reading https://trpc.io/docs/server/middlewares#experimental-standalone-middlewares, but it's sshared useTRPCClient hook conversion to v11In our mono repo, we have 30 or so MFEs which all use the same TRPC client setup. So, we abstracted Question: Is there a way to have a base interface for Trpc router?Hi, So I am trying to see if there is way to keep methods inside trpc routes consistent, Like in capersistedQueries & indexedDbWould like to know if someone else has tried out the feature and/if got it work, I'm trying to recrePublic and Private procedures Not working with Clerk and PrismaI have initialized a create-t3-app. I want to use clerk as my auth provider. I have ran into a problProperly handle unifying interfaces from tRPC call?I have two types of objects in my database, `quests` and `tasks`, which share several common propertType 'QueryClient' is missing the following properties from type 'QueryClient': queryCache, mutationI'm getting this error: > Type 'QueryClient' is missing the following properties from type 'QueryClHow to properly handle Prima selects/includes with tRPC?Hello, my understanding of optimizing procedures to be the most efficient would be to enable one proonSuccess with createTRPCProxyClientWhat is the best way to setup onSuccess with createTRPCProxyClient?trpcNext from client for testingHi guys, I have created a client that uses a mock database for testing. Can I create a context and tMissing content type header for mutations leads to 405Im migrating my app from Next Pages Router to App Router. I implemented the new trpc wrapper as explIs there any way to temporarily disable mutations?My goal is to move into a read-only mode temporarily. I'm thinking anything could be fine as a shoAfter upgrading to 11.0.0-next-beta.300, every request throws zod errorI didn't do anything but upgrading the trpc, and the error throws: ```json {"issues":[{"code":"inva