Data Router · console.warn
unnest "{from}" → "{to}" would close an unne...
Printed by Data Router, prefixed [lattice], since 1.84.0.
Warnings reference › router:unnest-cycle
- Identifier
router:unnest-cycle- Raised by
- Data Router
- Since
- 1.84.0
What happened
An unnest chain is a tree: a source unnests a child type, which may unnest its own. A spec whose as points back at an ancestor (or the source itself) would recurse forever, so the closing unnest is refused and the source's rows pass through unexpanded rather than the router recursing.
The fix
Point the nested unnest's as at a type that is not (transitively) an ancestor of this one.
The smallest fix
addSource('company', { unnest: [{ path: 'addresses', as: 'address' }] })
Reference
Covered in full at the API reference.