graphql-python / graphql-python/graphene-sqlalchemy

AssertionError: Found different types with the same name in the schema

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

説明

I have two Classes Products and SalableProducts in my Models (SalableProducts inherits from Products so it has every field of it's database), in my Schema here is what i did

```python
class Product(SQLAlchemyObjectType):
class Meta:
model = ProductModel
interfaces = (relay.Node, )

class ProductConnections(relay.Connection):
class Meta:
node = Product
```
```python
class SalableProduct(SQLAlchemyObjectType):
class Meta:
model = SalableProductModel
interfaces = (relay.Node, )

class SalableProductConnections(relay.Connection):
class Meta:
node = SalableProduct
```

and here is my Query class :

```python
class Query(graphene.ObjectType):
node = relay.Node.Field()
all_products = SQLAlchemyConnectionField(ProductConnections)
all_salable_products = SQLAlchemyConnectionField(SalableProductConnections)

```

When i run my server i got this error :

AssertionError: Found different types with the same name in the schema: product_status, product_status.

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

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

評価

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

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

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