pub fn project_nested_lists(
value: &mut Value,
type_name: &str,
selections: &[FieldSelection],
schema: &CompiledSchema,
)Expand description
#489 — recase + project nested LIST-of-object fields left raw by the SQL projection.
The query path projects top-level fields and nested single objects at the SQL level
(jsonb_build_object), but list fields fall back to the raw stored sub-blob
(snake_case keys, unselected keys included). This walks the already-projected
value guided by the selection set and, for each list-of-object field (up to the
projection depth cap), replaces its elements with the fully projected form via
project_entity at the element type. Non-list fields are left untouched — the SQL
side already projected them; single-object fields are only recursed into to reach
any lists nested inside them.
type_name is the entity type of value (or of each element when value is a
list-returning query’s top-level array); selections is the entity-level selection
set (the query field’s nested_fields).