Skip to content

RSocket routing definition alike tRPC #253

Description

@linux-china

Routing is built by RSocket by default. https://github.com/rsocket/rsocket/blob/master/Extensions/Routing.md

Is it possible to define RSocket router alike tRPC? It's really easy for client and server sides.

const helloRouter = router({
    hello: t.procedure
        .input(
            z.object({
                name: z.string(),
            }),
        )
        .request(({input}) => `hello ${input.name}` ),
    hello2: publicProcedure
        .input(z.string())
        .fire(({input}) => {
          console.log(input);
      })
});

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions