ChilliCream / graphql-platform

Welcome to the home of the Hot Chocolate GraphQL server for .NET, the Strawberry Shake GraphQL client for .NET and Banana Cake Pop the awesome Monaco based GraphQL IDE.
https://chillicream.com
MIT License
5.26k stars 746 forks source link

Faulty documentation on batch sizes #6865

Closed RobertStigsson closed 4 months ago

RobertStigsson commented 9 months ago

Product

Green Donut

Version

13.8.1

Link to minimal reproduction

https://github.com/ChilliCream/graphql-platform/blob/e2308ce28c296346bd5443bede04f1b5aec91d8b/src/GreenDonut/src/Core/DataLoaderOptions.cs#L11

Steps to reproduce

The documentation clearly states

/// default value is set to <c>0</c>.

while the actual value clearly is 1024

public int MaxBatchSize { get; set; } = 1024;

What is expected?

Documentation should match the code.

What is actually happening?

Documentation doesn't match the code.

Relevant log output

No response

Additional context

I don't know if you want 1024 to be the default value, or 0, but it should match.

RobertStigsson commented 9 months ago

After testing some more, it doesn't seem that 0 is infinite anymore either. So the whole documentation should probably be changed. (I think this is the information that checks for maxBatchSize, and it doesn't seem to check for 0)

https://github.com/ChilliCream/graphql-platform/blob/8717279ad915f224867d1f82b4b553bab3daabf6/src/GreenDonut/src/Core/DataLoaderBase.cs#L314

PascalSenn commented 9 months ago

@RobertStigsson Do you want to do a PR?

RobertStigsson commented 9 months ago

I could do a PR, but I don't know if I stumbled upon a bug or if it's just documentation being wrong?