Error formatting with trpcExpress.createExpressMiddleware
trpcExpress.createExpressMiddleware
- The documentation use trpcInit.context().create({ errorFormatter(opts) { ... })
which I'm not using as I'm following the React Query example from the docs.
Is there a concrete example I can refer to where should I plug the errorFormatter(opts)
?...Tried to access "$types.prototype" which is not available at runtime
Confused by the many examples and docs of implementing trpc, next.js (app router), and clerk.
import { createTRPCNext } from '@trpc/next';
And this is for nextjs Page router.In the T3-OS/create-t3-turbo https://github.com/t3-oss/create-t3-turbo/blob/main/apps/nextjs/src/trpc/react.tsx, which uses app router instead of page router, they are using
import { createTRPCReact } from "@trpc/react-query";
The T3-OS seems to be the closest to what I want, but they don't use clerk. And The repo the reference for clerk auth is out of date. ...3. NextJs (App) & TRPC require a different configuration....
TypeError: cache is not a function
uncachedValidateRequest
every time i create a TRPC context.
portion of trpc.ts
```ts...Can't throw error
How to use `getQueryKey` from the server side?
getQueryKey
from the server side. Is this possible?
The use case is i want to be able to set the query data from an RSC (server side) to arbitrary data. The SSRHelper .prefetch()
function does not satisfy my needs, as i would like to set the query data to an arbitrary value from a query executed in the RSC code.
Any help would be hugely appreciated!...keep previous data
Context with trpc ws client
Cannot use usemutation in my nextjs/t3 project
const mutation = api.auth.addaccount.useMutation();
const handleLogin = async (email: string, password: string) => {
await mutation({ email: email, password: password });
};
...Has anyone passed supabase user to the tRPC context in Expo?
Could we PLEASE get more docs on subscriptions / observables?
Extra information Subscriptions / WebSockets
section. Some more detailed explanations of how these thin...Adding trpc.useQuery hook to Next.js page with react-hook-form prevents stateful refresh.
React-query options not available in trpc/react-query?
keepPreviousData
option like this:
trpc.method.useQuery({ input: 'blah' }, { keepPreviousData: true })
trpc.method.useQuery({ input: 'blah' }, { keepPreviousData: true })
Server Error: client[procedureType] is not a function [ tRPC v10.45.2 OR v11 ] [ NextJS v14.1.X ]
use server
at the top of my server.ts file for interacting with tRPC on the server side.
I replaced it with import server-only
to discover this issue I followed the error to the code within node_modules
node_modules/.pnpm/@trpc+client@11.0.0-next.320_@trpc+server@11.0.0-next.320/node_modules/@trpc/client/dist/createTRPCClient.mjs
...Can I create custom terminating links?
Links
. In that case can I create a terminating Link that would make that request return early without invoking the server?
On a high level, what I'm trying to do is a local-first/offline-first application with tRPC...I want to use tRPC but I don't want a server
“Integrating Drizzle Prepared Statements with tRPC Context”
I have an actual data returned, but I get 404 spammed in the console
No "query"-procedure on path "auth.getProfile"