im working on a system built following DDD and some CQRS patterns written in symfony. Normally on a Query endpoint, the controller receives a request, and it uses an adapter service to build a query object and send it to the application layer.
Up to here everything is normal. But on a GetAll endpoint, functional wise I dont seem to require any request object (as i always return an array with all elements). Because of this, the questions seems like:
- Should i keep receiving a request and convert it into an empty query object just to cover the DDD/CQRS?
- Could I just call directly the application layer from my controller with no query params and just handle the response?
Thanks!