docs(rest): pagination total count (Prefer: count=) and exactCount option - #623
docs(rest): pagination total count (Prefer: count=) and exactCount option#623cb1kenobi wants to merge 3 commits into
Prefer: count=) and exactCount option#623Conversation
…tion Documents the REST pagination total-count feature shipping in Harper v5.3.0: - reference/rest/querying.md: new "Pagination and Total Count" section covering Prefer: count=exact|estimated, the Content-Range / Range-Unit / Preference-Applied response headers, the unavailable-total (.../*) case, HEAD pre-flight, CORS exposure, and disabling exact counts per mount. - reference/rest/overview.md: adds the `exactCount` rest-mount option. - reference/rest/headers.md: adds the Prefer request header and notes the count response headers. Version badges assume v5.3.0 (next minor after 5.2) — adjust if the feature lands in a different release. Pairs with the harper core branch feat/rest-pagination-total-count. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Code Review
This pull request documents the new pagination and total count feature introduced in version 5.3.0, including updates to headers, configuration options, and querying guides. The review feedback focuses on improving technical accuracy and consistency, specifically by clarifying the description of the Prefer header, using the correct =ct= operator notation, and correcting references to global configuration rather than per-mount settings.
🚀 Preview DeploymentYour preview deployment is ready! 🔗 Preview URL: https://preview.harper-documentation.harperfabric.com/pr-623 This preview will update automatically when you push new commits. |
A count request without a limit() is served normally with no count headers (the core feature falls through to streaming rather than counting the whole collection). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
🚀 Preview DeploymentYour preview deployment is ready! 🔗 Preview URL: https://preview.harper-documentation.harperfabric.com/pr-623 This preview will update automatically when you push new commits. |
Addresses review feedback on #623: - Drop the confusing/inaccurate "per REST mount" / "on a given mount" scope wording for exactCount. It is not a global setting — it is read only from a component's `rest:` config (server/REST.ts), so describe it as configured "in an application's REST configuration" rather than a mount or a global option. - Refer to the header as the `Prefer` request header (`Prefer: count=exact`). - Use the `=ct=` operator spelling for the contains example, matching the operators table. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
🚀 Preview DeploymentYour preview deployment is ready! 🔗 Preview URL: https://preview.harper-documentation.harperfabric.com/pr-623 This preview will update automatically when you push new commits. |
Documents the REST pagination total-count feature — companion to harper HarperFast/harper#2147.
Changes
Prefer: count=exact|estimated, theContent-Range/Range-Unit/Preference-Appliedresponse headers, the unavailable-total (.../*) case,HEADpre-flight, CORS exposure, and disabling exact counts per mount.exactCountoption to therest:config block.Preferrequest header and notes the count response headers.Version
Version badges assume v5.3.0 (next minor after 5.2). If the feature lands in a different release, it's a find/replace of
v5.3.0across the three files.Verification
npm run format:write+format:check— clean.npm run build— passes (onBrokenLinks: throw); new cross-links/anchors resolve. The only broken-anchor warnings are pre-existing pages, not these.🤖 Generated with Claude Code