Skip to content

1.1.0

Latest
Compare
Choose a tag to compare
@github-actions github-actions released this 03 Aug 16:53
· 9 commits to main since this release
1.1.0
9e004a3

This is the Magql-SQLAlchemy 1.1.0 feature release.

PyPI: https://pypi.org/project/magql-sqlalchemy/1.1.0/
Changes: https://magql-sqlalchemy.autoinvent.dev/page/changes/#version-1-1-0
Milestone: https://github.com/autoinvent/magql-sqlalchemy/milestone/1?closed=1

  • The description for a model's object, and for an attribute's field and argument, is set from their docstrings.
  • Handle fragments when inspecting query to load relationships.
  • Clearer error when SQLAlchemy session is not passed in GraphQL context.
  • List sorts can be paths across relationships, like user.name from Task. Filters can already be across relationships.
  • Default mutation resolvers have a separate prepare_obj method that creates/updates/deletes the object in the session but does not commit. This can be used to avoid extra commits when wrapping the default resolver with extra behavior.
  • Resolver classes and ModelManager, and their methods, are generic on the model class passed to them.
  • ModelManager has class attributes to override the item/list/create/update/delete resolver factories. ModelGroup has a class attribute to override the manager class. This can be used to customize the default behaviors.
  • Every generated object has a _display_value field that returns str(obj).