Peps
Peps
TtRPC
Created by Peps on 7/14/2024 in #❓-help
Procedure shows as `any` unless it's a mutation
Hey 👋 I'm trying to create a small monorepo FE/BE project in which I'm trying tRPC for the first time as it looks like a really cool way of building and consuming APIs. To give a bit of context, I got a separate API server using Hono, and a fresh create-next-app in which I initialised tRPC. However, I'm running into a strange type error that I can't quite explain. If my procedure is not a mutation, it'll show up as any on the client, whereas with mutation it's all good. I use strict mode and the same tRPC versions in both the client and server. Additionally I'm using the same paths between both. Previously I would indeed get any even for mutations without the paths being synced. Would appreciate any pointers of what I may be doing wrong here. Attached is a video to give a quick demonstration of what I mean. Node.js 20.11.0 tRPC 10.45.2
3 replies