jgoux
jgoux
TtRPC
Created by jgoux on 2/7/2024 in #❓-help
Private API, public clients
Hey everyone, we're about to OSS some good stuff at my company and I'm wondering what's the best approach to ship public libraries (like a CLI) which are communicating with a private tRPC powered API. It seems like today, trpc-openapi would be my best option? Like generating an openapi spec and using a typesafe openapi client generated with this spec?
2 replies
TtRPC
Created by jgoux on 10/18/2023 in #❓-help
tRPC and OpenTelemetry
Does anyone have experience with instrumenting tRPC with OTEL for tracing? It would be pretty neat to have an auto-instrumentation package like Prisma did : https://www.npmjs.com/package/@prisma/instrumentation
8 replies
TtRPC
Created by jgoux on 4/8/2023 in #❓-help
Am I the only one struggling with pnpm + TypeScript monorepo + trpc?
Hello all, When using pnpm in a TypeScript monorepo without node-linker, I hit those errors:
web/src/lib/trpc.tsx:7:14 - error TS2742: The inferred type of 'trpc' cannot be named without a reference to '../../../api/node_modules/@snaplet/sdk/src'. This is likely not portable. A type annotation is necessary.

7 export const trpc = createReactQueryHooks<WebRouter>()
web/src/lib/trpc.tsx:7:14 - error TS2742: The inferred type of 'trpc' cannot be named without a reference to '../../../api/node_modules/@snaplet/sdk/src'. This is likely not portable. A type annotation is necessary.

7 export const trpc = createReactQueryHooks<WebRouter>()
Types sharing between packages when using pnpm + TypeScript is quite broken, and I'm not sure what's the best move to solve it. Ideally I shouldn't have to alter my compilerOptions.paths, or install extra deps in the root. 😅 I opened a discussion about it here if you want to participate: https://github.com/orgs/pnpm/discussions/6367
24 replies
TtRPC
Created by jgoux on 4/7/2023 in #❓-help
Codemod to v10 is not modifying any file
Hello 👋, I must be super dumb but running pnpm dlx trpc-v10-migrate-codemod in my project isn't applying any change. I see all the files listed as "migrated" but nothing is saved on disk?
1 replies
TtRPC
Created by jgoux on 4/7/2023 in #❓-help
No overload matches this call when outputting unions
14 replies