Jack Fischer
Jack Fischer
TtRPC
Created by Jack Fischer on 12/21/2023 in #❓-help
Modify mutation error messages?
Hmm, this actually doesn't seem to let you modify the error, just take some external action with it
5 replies
TtRPC
Created by Jack Fischer on 12/21/2023 in #❓-help
Modify mutation error messages?
Ah I think I answered my own question,
trpcNext.createNextApiHandler({
onError: ...
})
trpcNext.createNextApiHandler({
onError: ...
})
5 replies
TtRPC
Created by vildantursic on 10/6/2023 in #❓-help
Cancel useQueries with single function
Hey @vildantursic did you figure out an option here?
5 replies
TtRPC
Created by Jack Fischer on 12/19/2022 in #❓-help
Any tips for Typescript slowness?
One more discovery: Setting typescript.tsserver.maxTsServerMemory higher in vscode helped a ton.
14 replies
TtRPC
Created by Jack Fischer on 12/19/2022 in #❓-help
Any tips for Typescript slowness?
Something we tried that didn't work that I should have mentioned: splitting our 2.5k line tRPC router into multiple files. No impact, or possibly slower
14 replies
TtRPC
Created by Jack Fischer on 12/19/2022 in #❓-help
Any tips for Typescript slowness?
don't really have a way of distinguishing whether it was zod or prisma contributing the most to the slow down
This is exactly our problem. In certain scenarios (for example writing a vanilla next.js endpoint not touching tRPC or zod, but involving edgedb) the editor suddenly becomes super fast. Lacking a way to determine why that is.
now that i think about it, it's not a performance problem but more like typescript goes nuts and gives random errors that stop showing when i close and open the file.
In my experience this is also a performance thing where the random errors are simply old and it's struggling to complete a new round of static analysis. Much like closing/opening, if you leave it alone, it eventually resolves
14 replies
TtRPC
Created by Jack Fischer on 12/19/2022 in #❓-help
Any tips for Typescript slowness?
Interesting, we're actually not. We're pretty casual users of zod. We do have other type intensive libraries though including EdgeDB. This likely has a lot to do with it but still interested in trpc-specific advice (like yours about zod)
14 replies
TtRPC
Created by Jack Fischer on 12/20/2022 in #❓-help
`QueryClientProvider` not included in `withTRPC`?
Beast thank you!
3 replies
TtRPC
Created by Jack Fischer on 12/19/2022 in #❓-help
Any tips for Typescript slowness?
Thank you
14 replies
TtRPC
Created by Jack Fischer on 12/5/2022 in #❓-help
Any way to view headers in middleware?
Brilliant thanks.
3 replies
TtRPC
Created by Jack Fischer on 11/16/2022 in #❓-help
Difference in type inference for vanilla client?
Yeah turns out I had done that in a subtle place for the hooks but not the vanilla client 🤦‍♂️
6 replies
TtRPC
Created by Jack Fischer on 11/16/2022 in #❓-help
Difference in type inference for vanilla client?
Fantastic, that was it. Thanks
6 replies
TtRPC
Created by Jack Fischer on 11/16/2022 in #❓-help
Difference in type inference for vanilla client?
Ah ha yes! We do have superjson and are on V9
6 replies
TtRPC
Created by Jack Fischer on 10/7/2022 in #❓-help
Show a spinner when any mutation is loading?
Ahh reference docs perfect. Thank you for this.
6 replies
TtRPC
Created by Jack Fischer on 10/7/2022 in #❓-help
Show a spinner when any mutation is loading?
Or alternatively, a way to add some "middleware" to useMutation to control a semaphore in the background?
6 replies
TtRPC
Created by Jack Fischer on 10/7/2022 in #❓-help
Show a spinner when any mutation is loading?
Oh wow this is perfect thank you. Do you know if there's a way for mutations specifically?
6 replies
TtRPC
Created by Jack Fischer on 10/5/2022 in #❓-help
Recommended file structure for next.js?
Got it thanks!!
8 replies
TtRPC
Created by Jack Fischer on 10/5/2022 in #❓-help
Recommended file structure for next.js?
Hey thanks a bunch. I think these give you the basic layout but not how to break out [trpc].ts - is it recommended to put individual query/mutations in that same trpc directory for example?
8 replies