Is your feature request related to a problem? Please describe.
In order to be able to support e.g. method guards, we want to expose a developer friendly way of writing decorators for runtime module methods.
Describe the solution you'd like
The actual API is to be designed, but the main intention is to allow runtime module developers to expose reusable pieces of business logic that can be applied to methods outside of the runtime module itself. The main feature of the decorator API would be to provide access to the this of the module/method to which the decorator is being applied. This then allows access to the module dependency injection, which the decorator might rely on.
Example of a decorator, that only allows an admin to call a method:
Is your feature request related to a problem? Please describe. In order to be able to support e.g. method guards, we want to expose a developer friendly way of writing decorators for runtime module methods.
Describe the solution you'd like The actual API is to be designed, but the main intention is to allow runtime module developers to expose reusable pieces of business logic that can be applied to methods outside of the runtime module itself. The main feature of the decorator API would be to provide access to the
this
of the module/method to which the decorator is being applied. This then allows access to the module dependency injection, which the decorator might rely on.Example of a decorator, that only allows an admin to call a method: