graphql-platform icon indicating copy to clipboard operation
graphql-platform copied to clipboard

Faulty documentation on batch sizes

Open RobertStigsson opened this issue 1 year ago • 3 comments

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 avatar Feb 06 '24 15:02 RobertStigsson

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

RobertStigsson avatar Feb 14 '24 15:02 RobertStigsson

@RobertStigsson Do you want to do a PR?

PascalSenn avatar Feb 14 '24 16:02 PascalSenn

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

RobertStigsson avatar Feb 21 '24 06:02 RobertStigsson