How to compose queries?

You can also just let the caller filter

Query
|> Ash.Query.filter(exists(patios, id == patio_id))
|> Ash.Query.filter(exists(parceiros_precos_estadias, parceiro_id == ^parciero_id and voucher == ^voucher))
|> YourApi.read()

this is safe to let them do, because all logic ultimately goes through a read action, and is always run through your policies for access rules.