ChilliCream / ChilliCream/graphql-platform
@defer on a UsePaging field hangs the incremental stream when a global field middleware is registered with UseField (v16 regression)
@michaelstaib is already working on this.
Since Aug 4, 2026.
- Dominant language
- C#
- Stars
- 5.8k
- Forks
- 810
- Avg merge
- 15h 39m
- Merged PRs (30d)
- 98
Description
Product
Hot Chocolate
Version
16.5.0
Link to minimal reproduction
https://github.com/slam1t/hc16-defer-paging-fieldmiddleware-bug
Steps to reproduce
Reproduce the bug
dotnet run -- enableGlobalFieldMiddleware
Open Nitro at http://localhost:5095/graphql, or POST this query directly:
{
pets {
name
... on Pet @defer {
dogs { nodes { name } }
}
}
}
Use Accept: multipart/mixed; deferSpec=20220824. The stream stalls after the
initial payload (hasNext: true, no incremental patches).
Example with curl:
curl -s -m 5 \
-H "Content-Type: application/json" \
-H "Accept: multipart/mixed; deferSpec=20220824" \
-d '{"query":"{ pets { name ... on Pet @defer { dogs { nodes { name } } } } }"}' \
http://localhost:5095/graphql
Expected (buggy) response — last part received, then the connection hangs:
{"data":{"pets":[{"name":"p1"},{"name":"p2"}]},"pending":[{"id":"2","path":["pets",0]},{"id":"3","path":["pets",1]}],"hasNext":true}
Control (works)
dotnet run
Run the same query. Incremental patches for dogs are delivered and the stream
completes with hasNext: false.
What triggers it
All three are required:
@deferon a field- That field uses
UsePaging(connection withnodes) - A global field middleware registered via
.UseField<>()(even a pass-through)
Removing any one of these delivers normally.
What is expected?
Query with Deferred paginated field completes
What is actually happening?
Query with Deferred paginated field hangs with no sign of completion
Relevant log output
Additional context
Note this worked in HC15. We discovered this bug when we migrated to HC16.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.