Passing Scope as a Parameter: Is It an Antipattern?
Is it antipattern to pass the Scope.Scope as a parameter?
I have service that implements web-socket protocol, and it cleans up connection with a clean up function
So I put this together, and tested locally and it works nicely. But when I deployed this in staging, service errored with
I thought if I declare scope at the entry point for the app (this is Lambda function), it's just going to use it automaticlaly and be happy but that didn't work - same error
I managed to make it work with passing scope around like this to services that use scoped protocol service
The question basically is if I made some internal service scoped, how to setup the scope within the main app (entrypoint)? Ty!
I have service that implements web-socket protocol, and it cleans up connection with a clean up function
So I put this together, and tested locally and it works nicely. But when I deployed this in staging, service errored with
Service not found: effect/ScopeI thought if I declare scope at the entry point for the app (this is Lambda function), it's just going to use it automaticlaly and be happy but that didn't work - same error
I managed to make it work with passing scope around like this to services that use scoped protocol service
The question basically is if I made some internal service scoped, how to setup the scope within the main app (entrypoint)? Ty!
