Rename `Extension` to `SchemaExtension` to pave the way for FieldExtensions. Importing `Extension` from `strawberry.extensions` will now raise a deprecation warning.
Before:
python from strawberry.extensions import Extension
After:
python from strawberry.extensions import SchemaExtension
Contributed by [Jonathan Kim](https://github.com/jkimbo) via [PR #2574](https://github.com/strawberry-graphql/strawberry/pull/2574/)
0.159.1
Not secure
--------------------
0.159.0
Not secure
--------------------
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
Not secure
--------------------
Add a type annotation to `strawberry.fastapi.BaseContext`'s `__init__` method so that it can be used without `mypy` raising an error.
Contributed by [Martin Winkel](https://github.com/SaturnFromTitan) via [PR #2581](https://github.com/strawberry-graphql/strawberry/pull/2581/)
0.158.1
Not secure
--------------------
0.158.0
Not secure
--------------------
Throw proper exceptions when Unions are created with invalid types
Previously, using Lazy types inside of Unions would raise unexpected, unhelpful errors.
Contributed by [ignormies](https://github.com/BryceBeagle) via [PR #2540](https://github.com/strawberry-graphql/strawberry/pull/2540/)