Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Format of incremental delivery responses #11476

Closed
jakobkhansen opened this issue Jan 10, 2024 · 2 comments
Closed

Format of incremental delivery responses #11476

jakobkhansen opened this issue Jan 10, 2024 · 2 comments

Comments

@jakobkhansen
Copy link

jakobkhansen commented Jan 10, 2024

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 #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?

@bignimbus
Copy link
Contributor

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 🙏🏻

@bignimbus bignimbus closed this as not planned Won't fix, can't repro, duplicate, stale Jan 10, 2024
Copy link
Contributor

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants