@stream initialCount validation #24
Replies: 3 comments 7 replies
-
@benjie I think this validation would require variables to be known? Does that mean it must be done during execution and not during validation? Are there examples of anything else like this? For example, this document is valid query ($myInitialCount: Int) {
listField @stream(initialCount: $myInitialCount)
} But not if sent with the arguments |
Beta Was this translation helpful? Give feedback.
-
Yeah, we can’t do it at the validation stage. Maybe just add text stating that negative numbers are treated as zero. Or even that the behaviour of negative numbers is undefined (which allows for them to do something specific in future). |
Beta Was this translation helpful? Give feedback.
-
There was agreement in the Dec 2021 WG meeting to throw a field error when a negative initialCount is encountered during execution. |
Beta Was this translation helpful? Give feedback.
-
Context
From @benjie graphql/graphql-spec#742 (review)
Decision
There was agreement in the Dec 2021 WG meeting to throw a field error when a negative initialCount is encountered during execution.
Status
Beta Was this translation helpful? Give feedback.
All reactions