You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I would like to implement 'partial responses via filtering' (using the fields query parameter) in my Spring Boot REST services but I could not find any Spring / Jackson build in functionality or add-on libraries to do it. As you refer to Spring/Java in your API guidelines in some places, I was wondering how you have implemented it.
Best regards,
Julian
The text was updated successfully, but these errors were encountered:
We actually have a Java/JavaScript library for this, that was retracted already 5 to 6 years ago from Zalando's Open Source GH repository. It was using simple filtering on top of the response. However, we do not think that this is a proper approach to provide this feature, since it resolves much more information from the database than it needs to and is inherently inefficient.
Internally, we advise our developers - if possible - to filter the data at the source instead of applying a post filter at the response for efficiency. I also advise in talks and reviews to focus the usage of filter-sets and embed-combination for distinct high value use cases, where the effect compared to the effort and costs creates the maximum benefit.
Thanks a lot for you answer!
So an example of "filter the data at the source" would be to transform the fields query into an sql projection and then use e.g. Java Optional fields to filter out uninitialized fields in the response payload?
You mentioned filter-sets. What do you mean with "sets"? Something predefined?
Hi, I would like to implement 'partial responses via filtering' (using the fields query parameter) in my Spring Boot REST services but I could not find any Spring / Jackson build in functionality or add-on libraries to do it. As you refer to Spring/Java in your API guidelines in some places, I was wondering how you have implemented it.
Best regards,
Julian
The text was updated successfully, but these errors were encountered: