Skip to content

Fix slicingArgumentDefaultValue exceeding the max page size in cost directives - #10671

Merged
michaelstaib merged 1 commit into
ChilliCream:mainfrom
michaelstaib:mst/cost-slicing-default-cap
Oct 23, 2026
Merged

michaelstaib merged 1 commit into
ChilliCream:mainfrom
michaelstaib:mst/cost-slicing-default-cap

Conversation

@michaelstaib

Copy link
Copy Markdown
Member

Hot Chocolate caps the default page size at the max page size at runtime, but the cost directive emitted the raw DefaultPageSize as slicingArgumentDefaultValue. A field with DefaultPageSize = int.MaxValue and MaxPageSize = 1000 was costed at int.MaxValue items whenever a query omitted first/last.

CostTypeInterceptor now caps slicingArgumentDefaultValue at the max page size, and composition caps each source's slicingArgumentDefaultValue at that source's assumedSize before folding, so archives composed from existing subgraphs are fixed by recomposing.

…irectives

Hot Chocolate caps the default page size at the max page size at runtime, but the
cost directive emitted the raw DefaultPageSize as slicingArgumentDefaultValue. A
field with DefaultPageSize = int.MaxValue and MaxPageSize = 1000 was costed at
int.MaxValue items whenever a query omitted first/last.

CostTypeInterceptor now caps slicingArgumentDefaultValue at the max page size, and
composition caps each source's slicingArgumentDefaultValue at that source's
assumedSize before folding, so archives composed from existing subgraphs are fixed
by recomposing.
@michaelstaib
michaelstaib merged commit 5c88f0d into ChilliCream:main Oct 23, 2026
152 checks passed
@michaelstaib
michaelstaib deleted the mst/cost-slicing-default-cap branch October 23, 2026 02:17
This was referenced Oct 25, 2026
This was referenced Nov 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant