graphql-platform
graphql-platform copied to clipboard
HC12 Batching only executes first operation
Is there an existing issue for this?
- [X] I have searched the existing issues
Describe the bug
I noticed that in HC12, when i make a batch of requests i am only getting the result to the first operation. This issue was already reported in slack by Chris Harris.
According to Chris, this issue seems to be localized in the MultiPartResponseStreamSerializer and his proposal worked for me, which is using:
services.AddHttpResultSerializer(
batchSerialization: HttpResultSerialization.JsonArray
);
Steps to reproduce
Make a request with a batch of operations:
[
{
"query": "query DummyQuery1 { buildVersion }",
"operationName": "DummyQuery1"
},
{
"query": "query DummyQuery2 { buildVersion }",
"operationName": "DummyQuery2"
}
]
Response:
---
Content-Type: application/json; charset=utf-8
{"data":{"buildVersion":"1.0.22011.112"}}
-----
Relevant log output
No response
Additional Context?
No response
Product
Hot Chocolate
Version
12.4.1
We have started work on batching.
This bug is still present in 12.7.0. Im unsure how to give further detail of the bug. I created a fresh project following the getting started section of the docs and here the bug is present aswell.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
@michaelstaib this issue is reproducible in v12.12.1, for now the workaround is to use HttpResultSerialization.JsonArray but by using it we lose the incremental delivery over HTTP. Any suggestions there?
I think @michaelstaib fixed this in v13
@nelsonprsousa @michaelstaib by any chance there will be a release including a fix for this issue against v12 or do we need to wait v13 release?
I think @michaelstaib fixed this in v13
I have tried the same with v13.0.0-preview.28, this issue is reproducible there as well
Not sure yet where we put this. We will fix it. But have no clue when yet. I will reevaluate this at the end of this month. At the moment everyone in the team busy on other topics.
This is now fixed and will be integrated into 12.14.0-preview.1