Annotation Interface Trpc.Mutation

Enclosing class:
Trpc

@Target(METHOD) @Retention(RUNTIME) @Documented public static @interface Trpc.Mutation
Marks a method as a tRPC mutation.

Mutations are used for creating, updating, or deleting data. Under the hood, Jooby will automatically expose this method as an HTTP POST route on the /trpc endpoint.

  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Custom name for the tRPC mutation.
  • Element Details

    • value

      String value
      Custom name for the tRPC mutation.

      This overrides the generated procedure name in the TypeScript router.

      Returns:
      The custom procedure name. Empty by default, which means the generator will use the Java method name.
      Default:
      ""