Get nested references with js sdk

Hi there!

I’m trying to reach the second nested level with one request through the .get function. My use case: I have a page model, which has a reference to data model A, and data model A has a reference to data model B.

With the current behavior, I’m fetching page content, and I can reach the first nested level (model A), but in the second level, I can only reach builder ids, which requires me to use another fetch for model B separately.

Is there any way to reach this level through SDK?


Hey @krzysztof, the includeRefs option will only get data for references one level deep. For a reference in a reference you can use the id and/or model returned to perform additional queries to inner references.