Skip to content

docs(rest): pagination total count (Prefer: count=) and exactCount option - #623

Open
cb1kenobi wants to merge 3 commits into
mainfrom
docs/rest-pagination-total-count
Open

docs(rest): pagination total count (Prefer: count=) and exactCount option#623
cb1kenobi wants to merge 3 commits into
mainfrom
docs/rest-pagination-total-count

Conversation

@cb1kenobi

Copy link
Copy Markdown
Member

Documents the REST pagination total-count feature — companion to harper HarperFast/harper#2147.

Changes

  • reference/rest/querying.md — new "Pagination and Total Count" section: 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 option to the rest: config block.
  • reference/rest/headers.md — adds the Prefer request 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.0 across 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

…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>

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread reference/rest/querying.md Outdated
Comment thread reference/rest/querying.md Outdated
Comment thread reference/rest/querying.md Outdated
Comment thread reference/rest/overview.md Outdated
@github-actions
github-actions Bot temporarily deployed to pr-623 August 11, 2026 23:23 Inactive
@github-actions

Copy link
Copy Markdown

🚀 Preview Deployment

Your 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>
@github-actions
github-actions Bot temporarily deployed to pr-623 August 11, 2026 23:37 Inactive
@github-actions

Copy link
Copy Markdown

🚀 Preview Deployment

Your 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>
@github-actions

Copy link
Copy Markdown

🚀 Preview Deployment

Your preview deployment is ready!

🔗 Preview URL: https://preview.harper-documentation.harperfabric.com/pr-623

This preview will update automatically when you push new commits.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant