Decorators Reference
@Procedures()
Marks a class as a tRPC procedures container. This decorator also applies@Service() for dependency injection.
@TQuery()
Marks a field as a tRPC query procedure.@TMutation()
Marks a field as a tRPC mutation procedure.Procedure Options
BothcreateTQuery and createTMutation accept the same options:
| Option | Type | Description |
|---|---|---|
params | Schema | Input validation schema (optional) |
returns | Schema | Output schema for documentation (optional) |
resolve | Function | The resolver function |
Schema Types
You can use Orionjs schema definitions:Merging Procedures
When using the component system, procedures are merged automatically viamergeComponents(). For standalone usage, you can use mergeProcedures to combine multiple procedure classes while preserving types: