graphql-python / graphql-python/graphene-sqlalchemy

Enum ChoiceType column results in error

オープン
#196 コメント 6 件 リアクション 1 件 担当者 0 名 GitHub で見る
bug
主要言語
Python
スター
985
フォーク
223
PR マージ指標
30日以内にマージされた PR はありません

説明

Howdy folks!

The following code produces `TypeError: 'MyEnum' object is not iterable`, but should work. Note that this is also involves package `sqlalchemy_utils`

```py
from enum import Enum

class MyEnum(Enum):
foo = 1
bar = 2

class MyModel(Base):
id = Column(sa.Integer, primary_key=True)
name = Column(sa.Unicode(255))
type = Column(ChoiceType(MyEnum, impl=Integer()))

class MyObject(SQLAlchemyObjectType):
class Meta:
model = MyModel
```

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。