Zero-config N+1 detection for TypeScript. Intercepts at the database driver level. Works with any ORM. Fails your tests when it finds a problem.
pg.Client and pg.Pool queries at the driver level. Every query is fingerprinted and tracked per async context. If the same query repeats above a threshold, your test fails.npm install qguard
No plugins to register. No setup files to create. No environment variables to set.
await assertNoNPlusOne(() => handler(req, res))
Import from queryguard/vitest or queryguard/jest. One function call wraps your handler.
QueryGuard fingerprints every SQL query. Repeated fingerprints above the threshold fail the test with the exact SQL, call site, and query count.
pg driver level, below your ORM. Any library that talks to PostgreSQL through pg is automatically supported.| queryguard | Sentry | DataLoader | Manual logging | |
|---|---|---|---|---|
| Detects at test time | Yes | No | No | No |
| Zero config | Yes | No | No | No |
| Works across ORMs | Yes | Yes | No | Yes |
| No SaaS required | Yes | No | Yes | Yes |
| CI assertions | Yes | No | No | No |
| Open source | MIT | Paid | MIT | -- |
Ruby has had Bullet since 2009. Node.js has QueryGuard now.