Same logic as in invenio-requests.
This is overall useful, because there are cases where we want to have dynamic approaches to modify/select the underlying class (e.g. based on some config). It's not something we currently need, but always handy to come across in the future (and a common pattern with other types of entrypoints too)
Originally posted by @slint in #17 (comment)