JSON inferred router output not matching
JsonValue
(definitions below).
The inferred type from the router.procedure.query()
on a createTRPCProxyClient
instance comes back as expected, but the type definition using inferRouterOutputs<AppRouter>
types the Json data as string | null
.
Any ideas? Thanks. New to tRPC so sorry if this is a no-brainer....Best way to implement input based validation on a router procedure
[Help] Turbo shared types
import type { AppRouter } from "../../../web/src/server/routers/_app";
which is currently what I am doing.
So my question is how would I go about this? do I need to somehow share the types between the two? if so how would I do it?.
Should I just seperate trpc as an internal package?...Cache SSG helper response
createProxySSGHelpers
in GSSP with ssr: false
in the global config.
I trying to cache a response of a public procedure called there, but I'm running into a dead end.
I tried following the "App caching" example in the docs (https://trpc.io/docs/caching#app-caching), but the responseMeta
option is unavailable if ssr: false
. (At least TS tells me so)...Is there are any relationship between tRPC and RPC(or gRPC)?
Inference on routes & procedures
Input is too big for a single dispatch
Request header too large
I was able to fix this by setting maxURLLength
However, now I receive another error "Input is too big for a single dispatch"
...
How to manage custom errors (e.g. custom error codes) in tRPC?
typesafe permissions
awaiting for procedure & logging the response.
createCaller Dependency Injection in Middleware ctx ?
createCaller
makes it really easy to inject dependencies via anything that's created during the createContext
function:
router.createCaller({ someClient: mockClient});
router.createCaller({ someClient: mockClient});
best practices for organizing routes/procedures?
Validating input inside middleware declaration
Fetch errors on stale pages
How to use querykeys from react-query
Distribute typesafe tRPC Client in an NPM library
Websocket is not defined error
@trpc/server in a non-server environment Error in Azure CI
How are people handling authorization?
trpc-shield
are gone from the documentation. Also, it only has 200 stars on GH, which is not that much when compared to tRPC itself. So I would be interested in how you're are handling authorization when using tRPC?Vitest context router caller