Variables within queries?

This is posed more as a question first before I know whether it would be feasible as a suggestion and that is would it be possible to allow for dynamic values or variables to be included within queries?

So at the moment when we create a component we can add in a query property to let us adjust the query on an instance by instance basis, however to do so you edit the entire query (in addition you set defaults for the query but then if you make any change to the query you have to re-set all properties rather than just the one you want to edit).

An example use case would be to create a property, such as “Item Count” which we could then attach to the “Count” property of the query itself.

This would allow us to create a component to list, say, a reviews CPT, then instead of having to edit the entire query (including re-applying the post types, ordering, plus any meta or tax filters) simply to change the number of results output, we’d just have a component prop “Item count” and this would simply change the number of results in the base query, leaving everything else untouched?

I suspect it might not be possible due to the fact that the db queries are run before the component is rendered but thought it would be worth asking.