conditional useQuery without input
trpc query help
change data from query
How do I set header value from localStorage or Zustand in tRPC and React?
App.tsx
:
```ts
function App(): JSX.Element {...how do you guys start a standalone trpc server?
TRPC completely broke
trpc + server actions
TRPC Mixed Content Error: This request has been blocked; the content must be served over HTTPS.
Infer context from procedure after middleware
.mutation(handlerFunc)
I moved the whole creation of the procedure into seprate files. This way you can put the handler function directly into the .mutation
call. This way the options (so also the context) are correctly inferred and the need to import the Context
type becomes unnecessary.
```ts...Why is Uint8Array converted in object when passed as input in `.mutate({ img: u8 })` - v11
Error: TRPCError: A non-domain error occurred
GraphQL Mutation API Design
uploading image via trpc endpoint
Unexpected end of JSON input error after upgrade to v11.0.0-rc.366 from rc.359
How can I get lint warnings for onSuccess/onError?
eslint-plugin-deprecation
and enabled it per instructions. I then got a bunch of other deprecation warnings, so the plugin seems to be working, but nothing on these onSuccess / onError callbacks.
Is this supposed to be working this way, or is there another way I could make it work?...How can I add React to SST's TRPC example?
tRPC useQuery with skipToken
enabled: !!foo
as it'll still refetch, etc (and yes I know you can disable certain refetches, but that's not the goal here).
I found a supported, type-safe solution on the tRPC docs (https://trpc.io/docs/client/react/disabling-queries).But... following their example nearly identically doesn't work for me....
Error calling middleware
Mutation returning a long URL is being cut off
TS7056: The inferred type of this node exceeds the maximum length the compiler will serialize.
tsc
complaining about my root app router type being too large when using --declarations
. There was a ticket from 2022 about this, but it seems to have been closed as solved. There are some Zod tickets about this too, but unfortunately they don't provide solutions that are viable (e.g. disabling --declaration
is not viable for me.)
It seems like this is caused by having a large app router, where "large" means it has a bunch of endpoints, and the total combination of those endpoints' input
and output
validators (using Zod schemas) go above a certain threshold. I can solve it by strategically adding explicit types to some of the query/mutation handler function definitions, but it's a bit odd....