Overview
atRiskAll() is an async generator that yields all at-risk users above a threshold, handling pagination automatically. Use it when you need to process the full list without managing offset / total yourself.
Signature
AtRiskAllOptions
Minimum score to include (0–1). Default:
0.5.Filter by plan.
Number of users to fetch per internal page. Default:
100.Examples
Process all at-risk users
Collect into an array
Early exit
With transformations
vs atRisk()
atRisk() | atRiskAll() | |
|---|---|---|
| Returns | One page | All pages (streaming) |
| Pagination | Manual | Automatic |
| Memory | Bounded | Unbounded (collects all if you push to array) |
| Use case | Dashboard, preview | Bulk processing, exports |