You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since #355 clients for other services, in the same Kalix service or between services, needs auth information from discovery, that was done through breaking change with a preStart callback on the components initializing the clients.
Since clients is a field on the component itself it gives the feeling that the clients should be available at any time after (or maybe even in) the constructor has been called. As this is no longer the case it would be better to move clients to the contexts so that it is not possible to accidentally try to access them in a place where they will not yet be initialized.
The text was updated successfully, but these errors were encountered:
One more aspect is that a user may want to create the client for a component once and re-use it rather than creating it over and over again, I figured out how to hack together an overload solution for TS but it's pretty messy:
Since #355 clients for other services, in the same Kalix service or between services, needs auth information from discovery, that was done through breaking change with a
preStart
callback on the components initializing the clients.Since clients is a field on the component itself it gives the feeling that the clients should be available at any time after (or maybe even in) the constructor has been called. As this is no longer the case it would be better to move clients to the contexts so that it is not possible to accidentally try to access them in a place where they will not yet be initialized.
The text was updated successfully, but these errors were encountered: