-
Notifications
You must be signed in to change notification settings - Fork 309
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
fix apollo request context error in some cases #4188
Conversation
Overall package sizeSelf size: 6.24 MB Dependency sizes
🤖 This report was automatically generated by heaviest-objects-in-the-universe |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #4188 +/- ##
=======================================
Coverage 85.22% 85.22%
=======================================
Files 247 247
Lines 10948 10948
Branches 33 33
=======================================
Hits 9330 9330
Misses 1618 1618 ☔ View full report in Codecov by Sentry. |
BenchmarksBenchmark execution time: 2024-03-26 00:16:25 Comparing candidate commit efe6a7b in PR branch Found 2 performance improvements and 0 performance regressions! Performance is the same for 258 metrics, 6 unstable metrics. scenario:plugin-graphql-with-depth-off-18
scenario:plugin-graphql-with-depth-on-max-18
|
What does this PR do?
Fix apollo request context error in some cases. I also refactored the integration to not store the requestContext on the plugin and instead rely on the context on the store, and made the
end
handler generic.Motivation
In some cases, the executor can run in a way that doesn't seem to always go through the instrumentation. This makes
requestContext
unavailable to child handlers which resulted in errors. There might be an underlying problem that causes the request instrumentation to never run in which case that problem would still exist, but at least with this PR it will no longer crash.Additional Notes
No test because I don't know how to reproduce this.