Calling a trpc endpoint inside of a trpc endpoint
Hey all.
I'm wondering how I am able to call these endpoints from within themselves?
For example, I'd like to call
getBotGuilds
and getUserGuilds
from within getAllGuilds
.
5 Replies
@cje did a video on this but I'm not on my laptop to find it
Tldr don't do it
Oh.. okay. If not this, how else?
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Christopher Ehrlich
YouTube
Advanced tRPC - Callers, functions, and gSSP
Repo for this video: https://github.com/c-ehrlich/you-dont-need-callers
If you want to use schema in the frontend, they cannot be imported from the same file as things that run specifically in the backend. One solution would be to put them into a
procedureName.schema.ts
or similar file.
tRPC:
https://trpc.io/docs
Create T3 App:
https://crea...Thanks for the responses guys. 🙂