T
tRPC
Best way to implement input based validation on a router procedure
Best way to implement input based validation on a router procedure
Message Not Public
Sign In & Join Server To View
Looking for more? Join the community!
T
tRPC
Best way to implement input based validation on a router procedure
T
tRPC
Best way to implement input based validation on a router procedure
Recommended Posts
[Help] Turbo shared typesI have a turborepo with two apps (web and embed). web is a t3 stack and embed is a create-react-app.Cache SSG helper responseI'm using `createProxySSGHelpers` in GSSP with `ssr: false` in the global config.
I trying to cacheInput is too big for a single dispatchI decided to try tRPC for my Crypto analytics dashboard. However, I'm having a hard time passing thetypesafe permissionsHi, So I wanted to infer all the procedures from my router recursively & assign a permission (stringawaiting for procedure & logging the response.Hi, I was wondering if there is a way to handle the return object via the post-middleware's? I know createCaller Dependency Injection in Middleware ctx ?`createCaller` makes it really easy to inject dependencies via anything that's created during the `cbest practices for organizing routes/procedures?i'm trying to find some practices/styles in which people generally define routes with trpc. currentlValidating input inside middleware declaration```js
const enforceUserIsCreatorOfEvent = t.middleware(({ ctx, next, input }) => {
if (!input.evenFetch errors on stale pagesRecently I have been getting a lot of fetch errors on stale pages, in particular ones that have querDistribute typesafe tRPC Client in an NPM libraryHi ! super fan of trpc over here.
We are building a javascript sdk for our API that is essentiallyMutation or query for something that updates db, but runs on every app load?I have 2 operations that need to run before showing my app UI. Those operations perform updates in DWebsocket is not defined errorI'm getting a "WebSocket is not defined error" on my next app connected to an express backend. Any i@trpc/server in a non-server environment Error in Azure CIIm trying to add vitest unit tests for my trpc procedures. I followed some examples and on the localHow are people handling authorization?I noticed that with V10, any mentions of `trpc-shield` are gone from the documentation. Also, it onlVitest context router callerHi, Im trying to setup vitest to test trpc. I would like to have a trpc approuter caller to be accesCannot read properties of undefined (reading 'data') of res.error.data, when trpc errors outHello everyone, I am using `@trpc/react-query` alongside `trpc` for express, and I am experiencing aExtending middlewareshttps://trpc.io/docs/middlewares#extending-middlewares
Is this available?Calling a trpc endpoint inside of a trpc endpointHey all.
I'm wondering how I am able to call these endpoints from within themselves?
For example,Frozen input paramIs it possible to define a parameter on input schema (zod) that will have a hardcoded/frozen value wtype mismatch between tRPC return (in sveltekit) and defined typei've got this piece of code: ```ts
read: async () => {
const res = await trpc($page).getCards.quer