Haaxor1689
Haaxor1689
TtRPC
Created by Haaxor1689 on 12/10/2023 in #❓-help
Transferring huge buffer
I've implemented it by returning the url to fetch from my mutation and added
protocol.handle('local-raw', request =>
net.fetch(`file:///${request.url.slice('local-raw://'.length)}`)
);
protocol.handle('local-raw', request =>
net.fetch(`file:///${request.url.slice('local-raw://'.length)}`)
);
to app.whenReady so the buffer doesn't have to go through tRPC
7 replies
TtRPC
Created by Haaxor1689 on 12/10/2023 in #❓-help
Transferring huge buffer
int8array
7 replies
TtRPC
Created by ati on 5/21/2023 in #❓-help
Using react-query parameters in tRPC for useQuery
Well normally with tanstack query you always write query key, async callback and options in this order but with tRPC wrapper you only pass the value there. It probably would be nice to have overload for queries with no input that only accept options as first argument but since there isn't one, passing undefined is fine. I think it even is in documentatuob like that.
5 replies
TtRPC
Created by ati on 5/21/2023 in #❓-help
Using react-query parameters in tRPC for useQuery
You can pass query options to useQuery hook from tRPC. Do you have a trpc query with no input? If yes then the first argument to tRPC useQuery should be undefined and options are 2nd argument.
5 replies
TtRPC
Created by Haaxor1689 on 5/16/2023 in #❓-help
setMutationDefaults for optimistic updates
Ok, made a PR with proposed fix 🙂 https://github.com/trpc/trpc/pull/4371
5 replies
TtRPC
Created by Haaxor1689 on 5/16/2023 in #❓-help
setMutationDefaults for optimistic updates
oh I found the culprit
5 replies
TtRPC
Created by Haaxor1689 on 5/16/2023 in #❓-help
setMutationDefaults for optimistic updates
After some investigation, turns out that for whatever reason, onSettled and onMutate work just fine. onSettled works only if I directly put it into hook call itself.
5 replies
TtRPC
Created by Haaxor1689 on 5/16/2023 in #❓-help
setMutationDefaults for optimistic updates
Hmm I found this closed issue https://github.com/trpc/trpc/pull/3528 I guess the adding of mutationKey was forgotten about?
5 replies