Remove deprecated extension legacy hooks#4226
Remove deprecated extension legacy hooks#4226Ckk3 wants to merge 3 commits intostrawberry-graphql:mainfrom
Conversation
Reviewer's GuideRemoves support for deprecated legacy extension hooks in the extension context management system, cleans up associated compatibility logic and tests, and documents the change and migration path in RELEASE notes. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've found 1 issue
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location> `RELEASE.md:3` </location>
<code_context>
+Release type: minor
+
+Remove deprecated extension legacy hooks (`on_request_start`, `on_request_end`, `on_validation_start`, `on_validation_end`, `on_parsing_start`, `on_parsing_end`), deprecated since [0.159.0](https://github.com/strawberry-graphql/strawberry/releases/tag/0.159.0).
+
+### Migration guide
</code_context>
<issue_to_address>
**suggestion (typo):** Consider reordering the phrase "deprecated extension legacy hooks" for clarity.
You could rephrase this as “deprecated legacy extension hooks” or just “legacy extension hooks” to read more naturally.
```suggestion
Remove deprecated legacy extension hooks (`on_request_start`, `on_request_end`, `on_validation_start`, `on_validation_end`, `on_parsing_start`, `on_parsing_end`), deprecated since [0.159.0](https://github.com/strawberry-graphql/strawberry/releases/tag/0.159.0).
```
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
|
Thanks for adding the Here's a preview of the changelog: Remove deprecated legacy extension hooks ( Migration guideBefore (deprecated): class MyExtension(SchemaExtension):
def on_request_start(self): ...
def on_request_end(self): ...After: class MyExtension(SchemaExtension):
def on_operation(self):
# on_request_start logic
yield
# on_request_end logicHere's the tweet text: |
Greptile SummaryThis PR completes the deprecation cycle for legacy extension hooks ( Key Changes:
The migration path is straightforward: logic that was split between Confidence Score: 5/5
Important Files Changed
Flowchartflowchart TD
A[Extension Lifecycle] --> B{Hook Type}
B -->|Operation| C[on_operation]
B -->|Validation| D[on_validate]
B -->|Parsing| E[on_parse]
B -->|Execution| F[on_execute]
C --> C1[Before operation logic]
C1 --> C2[yield]
C2 --> C3[After operation logic]
D --> D1[Before validation logic]
D1 --> D2[yield]
D2 --> D3[After validation logic]
E --> E1[Before parsing logic]
E1 --> E2[yield]
E2 --> E3[After parsing logic]
F --> F1[Before execution logic]
F1 --> F2[yield]
F2 --> F3[After execution logic]
style C fill:#90EE90
style D fill:#90EE90
style E fill:#90EE90
style F fill:#90EE90
Last reviewed commit: 2e28524 |
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>

Description
Remove deprecated extension legacy hooks (
on_request_start,on_request_end,on_validation_start,on_validation_end,on_parsing_start,on_parsing_end), deprecated since 0.159.0.Migration guide
Before (deprecated):
After:
Types of Changes
Checklist
Summary by Sourcery
Remove support for legacy extension lifecycle hooks in favour of the new event-driven hooks.
Enhancements:
Documentation:
Tests: