Use TRPCClientError.cause in frontend
CartValidationError
In the frontend, I want to be able to do:
```...Inconsistent types for mutation return type
signIn
mutation that returns:
```
{
accessToken: string;...Possible to build this custom hook?
Hydration error when using useQuery instead of useSuspenseQuery when prefetching
tRPC 404 in Next.js API Routes
app/api/trpc/[trpc]/route.ts
```ts
import { fetchRequestHandler } from "@trpc/server/adapters/fetch";...Best Monorepo Pattern for Sharing tRPC Logic Across Apps
tRPC CORS error
Prefetch using Next App router not working with useQuery but works with useSuspenseQuery
tRPC Client Bundling `node_modules`
.pnpm
and node_modules
in @trpc/client
. This is causing a lot of errors as I'm not using pnpm:
<project>/node_modules/@trpc/client/dist/TRPCClientError.mjs
```js
import { _ as _define_property } from './node_modules/.pnpm/@swc_helpers@0.5.13/node_modules/@swc/helpers/esm/_define_property.mjs';...Context parameters in server side calls
createContext()
function is defined with the FetchCreateContextFnOptions
parameter signature, how do you fill that information out when using server side api calls, for example via createCaller
? The example in the docs is inaccurate in that it defines a createContext
function to require some parameters:
export const createContext = async (opts: CreateNextContextOptions) => { ... }
export const createContext = async (opts: CreateNextContextOptions) => { ... }
Trigger.dev
Calling mutation with formData causes error: iterator method is not callable
TRPCClientError: iterator method is not callable
TRPCClientError: iterator method is not callable
Does tRPC require next?
@trpc/server@11.0.0-rc.553
to @trpc/server@11.0.0-rc.638
but my lockfile gets massive because pnpm installs Next.js
See https://github.com/bnussman/beep/pull/111/files#diff-32824c984905bb02bc7ffcef96a77addd1f1602cff71a11fbbfdd7f53ee026bbR12006
Am I doing something wrong or has something changed on the @trpc/server side? ...Do I need a server to use tRPC?
Can't get type inference from createTRPCNext instance
AppRouter
from the BE as per the instructions, and importing the type in the FE and passing it as a type argument to createTRPCNext
. When inspecting createTRPCNext
in the FE, I can see the type has resolved and the procedures are in there....Not able to seed react query cache
@trpc/react-query
Here is the code I wrote.
```ts...What is wrong with my subscription setup?
Make server side tRPC calls on an external tRPC server ?