Depth 2 not allowed for Orders, while docs say so
Why is depth 2 not allowed for my Orders object while the docs state that it is possible? Within the Order, I have a Line Items and therein a Products. I can only use depth 1, which gives me the Order with Line Items, but without the Products data.

5 Replies
Because it causes problem to Twenty and it needs refactoring https://github.com/twentyhq/twenty/issues/14452
GitHub
Implement relations depth 2 for rest api · Issue #14452 · twentyh...
Our previous implementation of relations depth 2 for rest api was blindlessly requesting all the relations, which caused inevitable timeouts due to the large number of left joins performed and reco...
Limitation was added recently, problem with depth=2 was for a longer period of time (critical timeout problem has started about a month ago) https://github.com/twentyhq/twenty/issues/12108
GitHub
API - can't fetch records via FindManyCompanies REST request with d...
Reproduced on dev seed Scenario: Log in Go to Settings > toggle Advanced > API Generate new API key Send "Find many companies" request with depth=2 Actual: There's an error in U...
Ah I see, thanks for the links Bob! I'd be better off using depth 1 then to fetch the Orders with their Line Items and then another api call to fetch the Products related to all the Line Items?
Using GraphQL is the best (and probably only) choice in this situation as depth=2 is simply removed from all REST methods here
I've never used GraphQL before, but sounds good, I'll look into it. Thanks for your help Bob 🙂