This message was imported from the Ruby/Rails Modularity Slack server. Find more info in the import thread.
Have you seen examples of how to expose DB query to the user, on the view, in a modular monolith? In the past, I’ve used the Ransack gem for this. And I’ve found a way to do it with a modular monolith, essentially passing the Ransack query hash: view->controller->subsystem API->service->ransack on model.
The most common means that I’ve seen of building these pages, especially when advanced queries can be constructed (user deciding which and how many filters to apply to the where clause) is through Ransack’s search form helpers (which integrates with things like simple_form). But that search_form helper requires a Ransack search object, which wants to be tied the model itself.
What have you seen/done to decouple the view from the search through a subsystem API while still creating an Advanced Query builder UI with clean code?