Extract unbounded read model capability to separate interface#25
Merged
Extract unbounded read model capability to separate interface#25
Conversation
…rface Move readUnbounded() methods out of ReadModelCapability into a dedicated UnboundedReadModelCapability interface so they are no longer exposed on BoundedContext by default. Dashboard code can opt in by extending the new interface in a custom bounded context type, leveraging the existing proxy mechanism. This keeps the public API clean for application developers. https://claude.ai/code/session_012D3mi7czkMEwKXYUvi7m2s
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Refactored the unbounded read model methods from
ReadModelCapabilityinto a dedicatedUnboundedReadModelCapabilityinterface to provide better separation of concerns and explicit opt-in for cross-context read operations.Key Changes
UnboundedReadModelCapability<DOMAIN_EVENT_TYPE>containing the tworeadUnbounded()method signaturesReadModelCapability#read()insteadReadModelCapability: Removed thereadUnbounded()methods and the associated TODO comment about visibilityBoundedContextImpl: Now explicitly implementsUnboundedReadModelCapability<DOMAIN_EVENT_TYPE>in addition to existing interfacesImplementation Details
This change makes unbounded read operations opt-in at the interface level rather than hidden behind a TODO comment. Bounded contexts that need dashboard/monitoring capabilities can now explicitly declare this requirement by extending
UnboundedReadModelCapability, making the intent clear and preventing accidental cross-context queries in regular application code.https://claude.ai/code/session_012D3mi7czkMEwKXYUvi7m2s