Commit 6025eff
perf(graphql): optimized join count when docs are not needed (#14872)
### What?
Optimizes the count of a join field when the goal is just to retrieve
the count value (i.e. limit: 0).
### Why?
Generates 1 database query instead of two when the goal is just to
retrieve the count value.
### How?
By using payload.count() instead of payload.find()
Co-authored-by: Ricardo Tavares <[email protected]>1 parent 070ded7 commit 6025eff
1 file changed
+10
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
444 | 444 | | |
445 | 445 | | |
446 | 446 | | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
447 | 457 | | |
448 | 458 | | |
449 | 459 | | |
| |||
0 commit comments