You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to use Apollo client (3.8.6) with Hot Chocolate (12) and trying to use defer in my queries for incremental delivery. However, it seems that the format of which Apollo client expects the incremental delivery to be in is different than what Hot Chocolate delivers.
Hot Chocolate responds with this format on an incremental delivery with updated data:
{"path":[...],"data":{...},"hasNext":true}
It seems that Apollo-client will only preserve the initial data, and not update with the incrementally delivered data which comes afterwards.
I also tried with a minimal example using Apollo Server instead, where the incremental deliveries are formatted like this:
{"incremental":[{"data":{...}}}], "hasNext":true}
However this fails with Cannot read properties of undefined (reading 'length') which I believe is the same issue as stated in #11452
My main question is really, what is the expected format for incremental delivery in Apollo client currently? Is it supposed to be functional at the moment even though it is an experimental feature? If not, when can one expect that the format aligns with the latest accepted spec which I believe Hot Chocolate (13) follows?
And if the format is supposed to be different than what Hot Chocolate can deliver, is there any way to intercept the response and convert it to the expected format before Apollo processes the response?
The text was updated successfully, but these errors were encountered:
Hi @jakobkhansen! The defer/stream proposal is still in Stage 3 and has undergone a lot of changes since late 2022. To avoid fragmenting the discussion, I'll close this issue and reference your comment in #11452 - thanks 🙏🏻
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
For general questions, we recommend using StackOverflow or our discord server.
Hello,
I am trying to use Apollo client (3.8.6) with Hot Chocolate (12) and trying to use defer in my queries for incremental delivery. However, it seems that the format of which Apollo client expects the incremental delivery to be in is different than what Hot Chocolate delivers.
Hot Chocolate responds with this format on an incremental delivery with updated data:
{"path":[...],"data":{...},"hasNext":true}
It seems that Apollo-client will only preserve the initial data, and not update with the incrementally delivered data which comes afterwards.
I also tried with a minimal example using Apollo Server instead, where the incremental deliveries are formatted like this:
{"incremental":[{"data":{...}}}], "hasNext":true}
However this fails with
Cannot read properties of undefined (reading 'length')
which I believe is the same issue as stated in #11452My main question is really, what is the expected format for incremental delivery in Apollo client currently? Is it supposed to be functional at the moment even though it is an experimental feature? If not, when can one expect that the format aligns with the latest accepted spec which I believe Hot Chocolate (13) follows?
And if the format is supposed to be different than what Hot Chocolate can deliver, is there any way to intercept the response and convert it to the expected format before Apollo processes the response?
The text was updated successfully, but these errors were encountered: