TypeScript Alias Imports don't get resolved ont the Client
/packages/*
packages, each has its own tsconfig.json
. I noticed that I get type errors on the client
side if I use TypeScript alias path imports on the server
package. The alias import paths for the server are only defined in the server/tsconfig.json
and not in the client/tsconfig.json
.
If I change the alias imports on the server side to relative imports, it works on the client. It seems like TypeScript cannot follow the imports correctly from client to server, because it doesn't check the server tsconfig.
Anyone the same issue?...merging other routers to appRouter
Can I get non-redacted INTERNAL_SERVER_ERRORS in production?
onError
handler, which is a little surprising: I don't want to send stack traces to the wider internet, of course, but I'd want an internal, server-side-only error handler with the raw errors. Is that possible? Thanks!Error handling: Zod errors and manually thrown TRPCErrors have different shape
error.message
contains a JSON encoded array of errors, but if a TRPCError is thrown in a procedure, error.message
is simply the error message.
Why do they have a different shape? How should I go about this? Should I try to standardize both to a JSON encoded array on the server? Or should I try to distinguish the two scenarios on the client-side?...prefetch() within getServerSideProps does not provide data upon manual refreshing
await ssh.user.getDepositInfo.prefetch(userId);
await ssh.user.getFQOperationHistory.prefetch(userId);
...How to modify existing cache data?
setInfiniteData()
?
When I return a modified version of the existing cache-data, TS throws errors about the [cachedData
] being recursively incorrectly formatted no matter what I do š !
Q1: This is way outside my league but I noticed this: Is there possibly an error in the [react-query] TS-definition at https://github.com/trpc/trpc/blob/main/packages/react-query/src/shared/proxy/utilsProxy.ts lines 155+156 because they are duplicates.
...When using createServerSideHelpers can the context be typed as GetServerSidePropsContext?
Query data is undefined for a bit and is then populated. How to use with React State?
should we use tRPC for handling form submittion or not?
What's the benefit of using the context instead of a direct import for the database connection?
Using both tRPC React client AND tRPC React Query client
TRPCClientErrorlike no name property
applyWSSHandler yells at context error in express
const handler = applyWSSHandler({wss, router: appRouter, createContext});
const handler = applyWSSHandler({wss, router: appRouter, createContext});
How to use the errorFormatter when using an adapter?
context.create()
, which isn't something you do when using an adapter.
I don't see an errorFormatter
exposed in createExpressMiddleware()
https://trpc.io/docs/server/error-formatting...One file per function call on the server side
Optimistic update on infinite query
Creating trpc context (express server) for testing without req and res objects.
What is error formating
where does opts.path and opts.type came from ? i guess by default it only stores ctx ,next and input