-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
馃殌 Feature: Add a max_depth Query function #7034
Comments
@mattie-cmsp, thanks for creating this issue! 馃檹馃徏 We're not sure if we want to move forward with this approach at the moment, but we'll keep this in mind. |
This is very necessary, I want the relationship but I'm not interested in the nested return every time, just in the keys, and sometimes 3 levels as default is already great |
I had the same feeling, started using relationships and could not find any depth control, dropped the idea, because of the amount of incoming data. It's not usable in current state, with out that. |
馃敄 Feature description
Add a new Query function to limit/raise the depth of relationship results.
馃帳 Pitch
As it stands, requesting an object that has relationships, without providing a select Query parameter, will result in objects that are up to 4 levels deep, which can be a very significant amount of data, especially since those relations might be X-to-many relations, and could be whole lists of lists of objects.
As the max depth is already being counted, I suspect that it might be easy to implement max_depth as a Query parameter that would simply adjust the existing max depth value in the current logic for this query. Providing this feature, soonish, could work as a stop gap measure to allow users much more efficient use of request/queries until full relationship query support is complete. And this is a feature that would continue to make sense once that full relationship query support is live, as well.
I'd be willing to work on a PR for this, or a related FR I made, 7033, if no one with better knowledge of the codebase is available to do so.
馃憖 Have you spent some time to check if this issue has been raised before?
馃彚 Have you read the Code of Conduct?
The text was updated successfully, but these errors were encountered: