-
-
Notifications
You must be signed in to change notification settings - Fork 312
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
Defer doesn't work with multipart/mixed or text/event-stream #2069
Comments
Hi @fredericbirke 👋 I work on Apollo Client and just came across this issue - would you be able to share a Replay recording of this issue? (Note: you don't have to grant Replay access to a private repo to create a recording, but it will contain source maps for your JavaScript code and record all network requests). You can share it directly with me at [email protected]. I'd love to look into this and see what may be happening. Thanks :) |
Hey @alessbell, |
Hey @fredericbirke 👋 Thanks for the offer, but I just noticed that Apollo Angular has its own |
Hey @alessbell, |
I won't work on this myself, but if you guys come up with a PR I'll gladly merge it. |
I'm on vacation this week but I don't need your reproduction, @fredericbirke, but thanks for the offer :) I can pick this up when I'm back online next week. |
Hey everyone 👋 I have some updates to share from looking into this today… First, I didn’t know when or why Apollo Angular’s Indeed, in Apollo Angular’s The bad newsXHR doesn’t support text streaming which is needed to power the multipart response format used to deliver the chunks. This is also an issue for React Native which uses XHR and requires a whole host of polyfills in order to get a feature like The good newsThat said, as far as I can tell there’s nothing preventing us from using Apollo Client’s If you're interested in trying it out yourself, the important bits are in All that said, I’m not an Angular dev and would love to hear from folks who try this out. There may be other implications of not using Angular’s Again, I’d love to hear from folks who try this out! I’m hoping it’s a feasible alternative, and it seems promising so far. As for this issue, it can probably be closed out as first party support in Apollo Angular’s |
Thank you for investigating. The bad newsNot using The good news
If we can leverage this new |
I didn't suggest removing
Indeed, by setting the providers with
|
Created a feature request here: angular/angular#52494 |
Hi @PowerKiKi 👋 Unfortunately I haven't had much luck with my feature request. We've gotten a fair number of support requests from users trying to use |
You might have a better position to update the docs as you see fit, since I am not super familiar with |
I found this issue when I was trying to implement support for batching requests to a Hot Chocolate backend. The error seen in the browser is the same. However, the Apollo Client currently does not support this either; see apollographql/apollo-feature-requests#387 |
I am experiencing the very same issue as @DanielRose when trying to batch with hot chocolate |
Describe the bug
Schema:
I use
@graphql-codegen/typescript-apollo-angular
for codegen.When using this query:
, generate code (which works fine) and then try to run it, I get the following error:
While digging deeper, you can find another error message:
Which might make sense, because the response is incremental. The Backends response looks like this (this is the
multipart/mixed
format):If I try to use
text/event-stream
the backend anwers like this:but then the Apollo Error looks like this:
I tested this with the react-client and it simply works. Maybe it's a bug in the codegen? I didn't use Codegen in the react test.
To Reproduce
Create a simple Backend with HotChocolate https://chillicream.com/docs/hotchocolate/v13 and defer any field. It doesn't work with the simplest case. If you want I can provide you one.
Expected behavior
Defer should work.
Environment:
Additional context
The text was updated successfully, but these errors were encountered: