Depreciate depth setting in favor of a two-way expending system
Actually depth setting is not adapted for our needs.
On nearly every case, it makes no sense to expend some nested fields because they are already loaded on app from another request: Expending the user
on every circle/notification/anything else is pointless as it were already loaded by itself.
Still on /users/xyz/
, I'd like to expend my Profile, ChatProfile, Account, Communities, Circles, Settings, Projects, from /users/xyz/ but I don't want to expend my Notifications, Skills, Job Offers as they are already served by another container/resource.
Maybe, by default nothing should get expended then the depth is separated in a two-way setting:
- Should I expend my nested fields?
- Should I get expended if I'm nested?
When both models agrees, then it would get expended.
This way a CircleMember would get expended on User or Circle but would not expend the User itself. Same goes for every other models