graphql-platform
graphql-platform copied to clipboard
HC0052 pagination error message does not take into account AllowBackwardPagination
Product
Hot Chocolate
Version
13.8.1
Link to minimal reproduction
See zip below
Steps to reproduce
Repro solution: HotChocolateBugRepro.zip
Code for reference:
public class Query
{
[UsePaging(RequirePagingBoundaries = true, AllowBackwardPagination = false)]
public IEnumerable<string> GetStrings() => [];
}
Query:
query {
strings {
nodes
}
}
What is expected?
An error message saying You must provide a `first` value to properly paginate the `StringsConnection`.
What is actually happening?
An error message saying You must provide a `first` or `last` value to properly paginate the `StringsConnection`.
Relevant log output
No response
Additional context
No response
Edge case: When using manual pagination (explicit first
/after
arguments), I guess AllowBackwardPagination
does nothing, so in that case the message should be determined based on the presence or absence of the last
argument.
This is mistakenly labelled Area: F#
. The repro code is C#.