-
Notifications
You must be signed in to change notification settings - Fork 522
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(integrations): Do not patch execute
#4026
Conversation
Codecov ReportAttention: Patch coverage is
✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## master #4026 +/- ##
==========================================
- Coverage 80.24% 80.24% -0.01%
==========================================
Files 139 139
Lines 15424 15403 -21
Branches 2608 2605 -3
==========================================
- Hits 12377 12360 -17
+ Misses 2203 2202 -1
+ Partials 844 841 -3
|
@sentrivana thanks! I totally forgot that sentry was using those files 😊 |
execute
@patrick91 No worries, not sure TBH why we were patching |
For everyone following, this will be fixed in the next SDK release later this week. |
@@ -27,16 +27,17 @@ | |||
raise DidNotEnable("strawberry-graphql integration requires Python 3.8 or newer") | |||
|
|||
try: | |||
import strawberry.schema.schema as strawberry_schema # type: ignore |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so glad this is gone :D
Looks like the new release of strawberry (0.259.0) is not compatible with our integration. Fix it.
Context
New Strawberry version removes the
execute
andexecute_sync
functions that we were monkeypatching in favor of integrating the code directly inSchema.execute
andSchema.execute_sync
.We were previously patching
execute
instead ofSchema.execute
that's calling it because that way we had access to a populatedexecution_context
which contains data that we wanted to put on the event via an event processor.We have access to the
execution_context
directly in the extension hooks Strawberry provides, so we now add the event processor there instead of monkeypatching anything.This should also work for older Strawberry versions, so shouldn't be necessary to keep the old implementation around for compat.
Closes #4037