-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
LoopBack 3 use case
I have one LB3 project with operation hook function used: .afterRemote and .observe('before save'.
LoopBack 4 new solution
I am referring to this toturial: https://loopback.io/doc/en/lb4/migration-mounting-lb3app.html for migration now.
The good news is that Swagger API is working after the migration.
Unfortunally, I find the operation hook will not work anymore after I mount LB3 project as a component in LB4.
And there's interceptors will take the role of operation hooks, But it seems inteceptors is only working with LB4 Controllers and handler functions for REST routes.
Is that possible LB4 interceptors can work with mouted LB3 application? Or am I misunderstanding the LB4 interceptors use case?
Not sure if we can configure my global interceptor to app in the index.ts. I did't find a good example to explain the
app.interceptor(CachingInterceptorProvider, {
global: true,
group: 'caching',
key: 'caching-interceptor',
});
Thank you so much.