PopulateMapEntry
PopulateMapEntry = {
kind:"relationship"|"upload";scalar?:true;target:string; } | {fields:Record<string,PopulateMapEntry>;kind:"group"; } | {blocks:Record<string,Record<string,PopulateMapEntry>>;kind:"blocks"; } | {discriminator:string;kind:"variant";variants:Record<string,Record<string,PopulateMapEntry>>; } | {kind:"record";value:PopulateMapEntry; }
Defined in: packages/core/src/types/generated.ts:365
One field’s entry in CollectionsPopulateMap — mirrors the field
tree down through group()/array()/blocks() boundaries that
CollectionsFieldTypeMap stops at (it only indexes getDataFields’s
flat, top-level-per-container output).
relationship/upload— a leaf:targetis the collection the field’s ids resolve against.group—fieldsis this group’s OWN nested populate map (same shape as a collection’s top-level map).blocks—blocksis keyed by each block’sblockTypeslug, each value that block’s own nested populate map.record— akeyValue()field;valueis the ONE shared entry every record key’s stored value is populated against (the same entry, applied to every dynamically-keyed entry — unlikegroup/blocks, there is no static per-key map to express).
array() never appears here: its own entry (built by
fieldsToPopulateMap) IS its items field’s entry — an array of
relationship ids behaves like the relationship field itself, an array of
group() items behaves like the group.