-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
BatchHTTPLink is not monitoring friendly #11849
BatchHTTPLink is not monitoring friendly #11849
Comments
Hi @dbasilio 👋 Thanks for opening this issue - the reproduction and linked issues are helpful :) I'll get this on our team agenda, thanks! |
Quick update, I have a PR open here: #11860 |
* fix: reevaluate window.fetch each time BatchHttpLink is used, if not configured using options.fetch * chore: add changeset
Do you have any feedback for the maintainers? Please tell us by taking a one-minute survey. Your responses will help us understand Apollo Client usage and allow us to serve you better. |
The fix be included in the next patch release, v3.10.5, which will go out later this week 🚀 |
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. |
Issue Description
We're trying to integrate Datadog RUM, which attaches headers to outgoing requests if they match certain patterns. When using HTTPLink, the headers are always correctly attached. When using BatchHTTPLink, the headers are not attached. This was previously not working for HTTPLink but was fixed in #8603, but that same fix was not applied to BatchHTTPLink.
BatchHTTPLink is maintaining a local reference to fetch that monitoring tools cannot inject headers into.
Link to Reproduction
https://github.com/dbasilio/apollo-dd-rum-repro
Reproduction Steps
See the readme in the repro repo
@apollo/client
version3.8.10
The text was updated successfully, but these errors were encountered: