Skip to content

fix(graphql): default MAX_PRODUCTS_PER_REQUEST to 5000 - #73

Merged
andreacappelletti97 merged 1 commit into
mainfrom
fix/products-cap-5000
Sep 29, 2026
Merged

andreacappelletti97 merged 1 commit into
mainfrom
fix/products-cap-5000

Conversation

@andreacappelletti97

Copy link
Copy Markdown
Contributor

#60 capped each request at 1,000 products. c3x pricing sync enumerates the catalog with limit:5000 pages, and released CLIs treat a page shorter than 5,000 as the last one. So since that deploy, every sync kept only the first 1,000 products of each service and region, and c3x estimate --offline priced most resources at the $0 stub. I reproduced it: an m5.xlarge came out at $0 offline versus $140.16 live, and a synced us-east-1 cache had 4,455 prices instead of 22,364.

Deploy note: the VPS .env has no MAX_PRODUCTS_PER_REQUEST line, so rebuilding picks up the new default. Alternatively, add MAX_PRODUCTS_PER_REQUEST=5000 to .env and restart the API.

c3x pricing sync enumerates the catalog 5,000 products per request, and released CLIs treat a shorter page as the last one, so the 1,000 cap truncated every sync to its first page and broke c3x estimate --offline.
@andreacappelletti97
andreacappelletti97 merged commit 259e25f into main Sep 29, 2026
4 checks passed
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