Annotation Interface Trpc.Query

Enclosing class:
Trpc

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

Queries are strictly used for fetching data. Under the hood, Jooby will automatically expose this method as an HTTP GET route on the /trpc endpoint.

  • Optional Element Summary

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

    • value

      String value
      Custom name for the tRPC query.

      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:
      ""