Use Lookahead for work items children field

What does this MR do and why?

Use lookahead for WorkItems::ChildrenResolver to prevent N+1s queries when fetching the children's widgets.

Note that some fields are still executing extra queries, but they require more complex solutions and will be addressed separately:

field issue
rolledUpCountsByType Fix rolled_up_counts_by_type work item children... (#508701) (blocked by Cache hierarchy descendant counts (#480425))
depthLimitReachedByType Fix depth_limit_reached_by_type work item child... (#508702) (blocked by Cache hierarchy descendant counts (#480425))
rolledUpWeight Fix rolled_up_weight work item children N+1 (#508698 - closed) (blocked by Cache weight rollup value (#475273 - closed))
rolledUpHealthStatus Fix rolled_up_health_status work item children N+1 (#508700) (blocked by Cache health status rollup value (#480424))

References

Related to #560674 (closed)

Screenshots or screen recordings

Query count changes
Before After
before_query_count Screenshot_2025-08-18_at_11.09.37
Screenshot_2025-08-11_at_11.45.38 Screenshot_2025-08-18_at_11.10.07

The changes also address Fix dates_source work item children N+1 (#508697 - closed)

Query count changes
Before After
Screenshot_2025-08-11_at_12.15.46 Screenshot_2025-08-11_at_12.16.20

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Merge request reports

Loading