graphql-python / graphene-sqlalchemy

Graphene SQLAlchemy integration
http://docs.graphene-python.org/projects/sqlalchemy/en/latest/
MIT License
980 stars 226 forks source link

Pick up the docstrings of hybrid properties #298

Closed bim9262 closed 2 years ago

bim9262 commented 3 years ago

Use the docstring of hybrid properties as the description.

coveralls commented 3 years ago

Coverage Status

Coverage increased (+0.008%) to 97.619% when pulling 5a3c843eb0365d257bcbdf63688c78231a23d764 on bim9262:hybrid_property_description into 20ecaeadf2144b88555a3daf1a04e31b7f2ff95a on graphql-python:master.

bim9262 commented 3 years ago

The tox.ini and setup.py's sqlalchemy version requirements are at odds:

ERROR:   py37-sql11: could not install deps [.[test], sqlalchemy>=1.1,<1.2]; v = InvocationError("/tmp/graphene-sqlalchemy/.tox/py37-sql11/bin/python -m pip install '.[test]' 'sqlalchemy>=1.1,<1.2'", 1)
bim9262 commented 3 years ago

Bumped build requirments for sqlalchemy becase as noted in the documentation before version 1.3.19 the ordering for all_orm_descriptors was not deterministic:

.. versionchanged:: 1.3.19 ensured deterministic ordering for
   :meth:`_orm.Mapper.all_orm_descriptors`.
erikwrede commented 2 years ago

Thanks for the PR! I think it is a handy feature to have since adding the documentation in the ObjectTypes is a lot of redundant work. However, I think dropping support of SQA < 1.3.19 is very critical. Is there a way to add this without dropping support for two major releases of SQLAlchemy?

bim9262 commented 2 years ago

@erikwrede , I'll take a look. It's been a while since I've looked at this... Looks like some rebasing is in order too.