strawberry-sqlalchemy icon indicating copy to clipboard operation
strawberry-sqlalchemy copied to clipboard

Generate description out of sqlalchemy doc

Open comtihon opened this issue 1 year ago • 0 comments

Would be nice if docs from sqlalchemy fields form schema description

class Project(Base):
    __tablename__ = "projects"
    address = Column(String, nullable=False, doc="This is an address")

Feature Request Type

  • [ ] Core functionality
  • [ ] Alteration (enhancement/optimization) of existing feature(s)
  • [x] New behavior

Description

For some reason chatgpt is sure that it will work, but I tested it with latest version and I can't see comments from doc. What works for me is only setting it via core stawberry manually:

name: str = strawberry.field(description="The name of the user")

but this kills the whole idea of this library since I have to write boilerplate code for every model. Would be perfect for autodocumentation support if I can set up docs in my entites and get them converted in the schema description.

Upvote & Fund

  • We're using Polar.sh so you can upvote and help fund this issue.
  • We receive the funding once the issue is completed & confirmed by you.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar

comtihon avatar Feb 09 '24 10:02 comtihon