2026-05-17-payment-request-fetch-performance

publishedtype/changelog

TL;DR

Shipped the backend-claim-dev performance execution plan for payment-request fetch, counters, mark-as-paid reload, tracking read path, and reference responses; API contract stays backward-compatible when page / limit are omitted.

Details

  • Pagination: FETCH_PAYMENT_REQUEST_MAX_LIMIT clamp; two-phase ID fetch when any mapMany join exists (mapManyJoins.length >= 1).
  • Counters: parallel my_request counts; approver counters share work where safe; finance approver parallel base fetches (still JS filter for semantics — SQL push-down documented as follow-up).
  • Mutations: markAsPaid uses one batched full-detail reload; notifications chunked with bounded concurrency.
  • HTTP: Cache-Control: private, max-age=120 on vendor list.
  • Docs: backend-claim-dev/docs/backend/api-overview.md, docs/database/db-index-audit.md (vendor ILIKE / pg_trgm note).

Sources

  • Application repo: backend-claim-dev (local working tree).