vildantursic
Why is Uint8Array converted in object when passed as input in `.mutate({ img: u8 })` - v11
I passed Uint8Array as input for file saving but when I log it on API (trpc function) it is shown as object of same array not array itself. Why is that?
2 replies
Pass additional data from `useQuery` to context
For
splitLink
there is a way to pass context value through useQuery
as second param { trpc: { context: { x: y } } }
, but it doesn't propagate further from splitLink
.
Is there a similar way to pass some data to context (I want to update context data dynamicaly) after its initialization createContext
?
I have case where my app have route e.g. /[appName]/machine/[x]
and I would like to pass appName
to context so that I don't have to pass it each time with other params on useQuery
. Is that possible and what would be the best way?
I was trying this trpc.machine.useQuery({ id: x }, { trpc: { ctx: { app: "<appName>" } } })
and similar variations.1 replies
Hybrid application with offline and online mode setup with tRPC
Hi, I was wondering if I could setup tRPC in way that one http link is using local API (for offline mode) and another uses online http link for when user logs in and connects to online service.
What would be best setup, is it fine if I use
splitLink
in this case.
Is tRPC ment for this kind of setup.
Thanx1 replies