Skip to main content
Version: v10.0.0

TrpcSocketSchema

Maps the subscriptions of a tRPC router to the schema understood by createSocketSdk . Every subscription becomes a $listener whose payload is the procedure input and whose response is the event it yields, without the

tracked() wrapper. Queries and mutations are left out, they are sent with the TrpcAdapter .


Import
import { TrpcSocketSchema } from "@hyper-fetch/trpc"

Preview​

type TrpcSocketSchema<Router> = TrpcSocketRecordSchema<Router, Router[_def][record], >;