This repo demonstartes a minimal repro for a bug in Chilli Cream's HotChocolate using the @stream directive. The bug occurs when the initialCount value exceeds the number of available items.
The bug is demonstrated by the query:
query StreamMinimalRepro {
books @stream(initialCount: 7) {
title
}
}Since the underlying enumeration provides only five items, yet seven are requsted, the bug is encountered and results in the error:
{
"errors": [
{
"message": "Cannot return null for non-nullable field.",
"locations": [
{
"line": 2,
"column": 3
}
],
"path": [
"books"
],
"extensions": {
"code": "HC0018"
}
}
],
"data": null
}