fix(integrations): Do not patch execute#4026
Merged
sentrivana merged 10 commits intomasterfrom Feb 11, 2025
Merged
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
|
Contributor
|
@sentrivana thanks! I totally forgot that sentry was using those files 😊 |
execute
Contributor
Author
|
@patrick91 No worries, not sure TBH why we were patching |
Contributor
Author
|
For everyone following, this will be fixed in the next SDK release later this week. |
patrick91
approved these changes
Feb 11, 2025
| raise DidNotEnable("strawberry-graphql integration requires Python 3.8 or newer") | ||
|
|
||
| try: | ||
| import strawberry.schema.schema as strawberry_schema # type: ignore |
sl0thentr0py
approved these changes
Feb 11, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Looks like the new release of strawberry (0.259.0) is not compatible with our integration. Fix it.
Context
New Strawberry version removes the
executeandexecute_syncfunctions that we were monkeypatching in favor of integrating the code directly inSchema.executeandSchema.execute_sync.We were previously patching
executeinstead ofSchema.executethat's calling it because that way we had access to a populatedexecution_contextwhich contains data that we wanted to put on the event via an event processor.We have access to the
execution_contextdirectly 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