PERF004infoPro

subscription-waterfall

2+ child queries gated by the same parent query create a sequential waterfall.

Applies to: JavaScript, TypeScript

Why this matters

When multiple child queries depend on a parent query via `enabled: !!parentData`, they can't start until the parent finishes — creating a sequential waterfall. This is especially slow when the child queries are independent of each other. Consider a server-side join, a combined procedure, or parallel fetching with Suspense.

Catch it before it ships

pip install stablestack # or: npx stablestackstablestack # scans your project, PERF004 includedstablestack explain PERF004

PERF004 is part of the Pro rule set. See pricing — the free tier ships 24 checks with no signup.

False positive in your codebase? Suppress a single line with # noqa: PERF004