FEATURE: Add option to disable resolving nested entities #3864
Labels
backend
Issues related to Aleph’s backend, API, CLI etc.
feature-request
Requests for new features or enhancements of existing features
Moderate
Issue that may require attention
Is your feature request related to a problem? Please describe.
API endpoints that return entities (such as search, fetching individual entities) automatically resolve nested entities. For example, the entity ID
456def
in the following entity would be resolved:The resolved API response will look like this:
In many cases, this is useful (e.g. it’s heavily relied on by the UI). However, in some cases it may be preferred to return the unresolved entity IDs instead (e.g. when exporting a subset of the entity graph).
Describe the solution you'd like
I suggest adding an optional query parameter to relevant endpoints (e.g.
resolve
ornested
) that defaults to the current behavior, but can be used to optionally disable automatic resolution.Describe alternatives you've considered
Manually replacing resolved entity objects with their IDs. This works, but it adds overhead, especially when implementing one-off scripts for analysis.
Additional context
It should be fairly easy to implement this in the
Serializer
class.The text was updated successfully, but these errors were encountered: