Skip to Content
DocsNestJS CRUD AutomatorAPI ReferenceDecoratorsService DecoratorsService Decorators

Service Decorators

Service decorators scaffold CRUD logic inside providers and optionally emit lifecycle events for function subscribers.

Available decorators

DecoratorPurposeReference
@ApiServiceInjects CRUD-ready methods (create, update, delete, get, getList, getMany) tied to an entity repository./docs/nestjs-crud-automator/api-reference/decorators/api-service/api-service
@ApiServiceObservableMarks the service as observable so function subscribers receive before/after/error hooks./docs/nestjs-crud-automator/api-reference/decorators/api-service/api-service-observable
  1. Extend ApiServiceBase or supply a repository property.
  2. Decorate the class with @ApiService to enable CRUD helpers.
  3. Add @ApiServiceObservable when subscribers must mutate inputs/outputs or enforce policies at the service layer.
Last updated on