diff --git a/CHANGELOG.md b/CHANGELOG.md index 822c784bb4..37ecad49ff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,37 @@ CHANGELOG ========= +0.159.0 - 2023-02-22 +-------------------- + +This release changes how extension hooks are defined. The new style hooks are +more flexible and allow to run code before and after the execution. + +The old style hooks are still supported but will be removed in future releases. + +**Before:** + +```python +def on_executing_start(self): # Called before the execution start + ... + + +def on_executing_end(self): # Called after the execution ends + ... +``` + +**After** + +```python +def on_execute(self): + # This part is called before the execution start + yield + # This part is called after the execution ends +``` + +Contributed by [ניר](https://github.com/nrbnlulu) via [PR #2428](https://github.com/strawberry-graphql/strawberry/pull/2428/) + + 0.158.2 - 2023-02-21 -------------------- diff --git a/RELEASE.md b/RELEASE.md deleted file mode 100644 index e61eb20791..0000000000 --- a/RELEASE.md +++ /dev/null @@ -1,26 +0,0 @@ -Release type: minor - -This release changes how extension hooks are defined. The new style hooks are -more flexible and allow to run code before and after the execution. - -The old style hooks are still supported but will be removed in future releases. - -**Before:** - -```python -def on_executing_start(self): # Called before the execution start - ... - - -def on_executing_end(self): # Called after the execution ends - ... -``` - -**After** - -```python -def on_execute(self): - # This part is called before the execution start - yield - # This part is called after the execution ends -``` diff --git a/pyproject.toml b/pyproject.toml index 3d610879a3..3293bd44b9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [tool.poetry] name = "strawberry-graphql" packages = [ { include = "strawberry" } ] -version = "0.158.2" +version = "0.159.0" description = "A library for creating GraphQL APIs" authors = ["Patrick Arminio "] license = "MIT"