strawberry-sqlalchemy
strawberry-sqlalchemy copied to clipboard
Implement Standalone Convert; Enum Handling; User Edge/Connection Classes; Column Alias Handling
Description
This includes a number of changes, including:
-
mapper.type
now callsmapper.convert
- this allowsmapper.convert
to be called within user code, which makes the relevant functionality accessible where a decorator is not appropriate. -
strawberry.enum
is called against SQLAlchemy Enum columns. - Rather than relying on dynamically generated, model specific classes, the user can now pass Edge and Connection classes to the mapper constructor. This is necessary where those Edge/Connection classes are used elsewhere in user schemas.
- Relationship mapping is updated such that user-defined column names are taken into account rather than just model attribute names.
Types of Changes
- [ ] Core
- [ ] Bugfix
- [ ] New feature
- [ ] Enhancement/optimization
- [ ] Documentation
Issues Fixed or Closed by This PR
Checklist
- [x] My code follows the code style of this project.
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [ ] I have read the CONTRIBUTING document.
- [ ] I have added tests to cover my changes.
- [ ] I have tested the changes and verified that they work and don't break anything (as well as I can manage).