graphql-python / graphql-python/graphene-sqlalchemy

flask_sqlalchemy example : different types with the same name in the schema: EmployeeConnection, EmployeeConnection.

未關閉
#153 29 則留言 6 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
Python
星號
985
分支
223
PR 合併指標
30 天內沒有已合併 PR

描述

Hi,

I followed the instruction to use the flask_sqlalchemy example with a Python 2.7 version, when I run the app.py script, I've got the following error :

```
(py27) λ python app.py
Traceback (most recent call last):
File "app.py", line 7, in
from schema import schema
File "D:\Thomas\Dev\graphene-sqlalchemy\examples\flask_sqlalchemy\schema.py", line 60, in
schema = graphene.Schema(query=Query, types=[Department, Employee, Role])

....

File "D:\Programmes\Anaconda2\envs\py27\lib\site-packages\graphene\types\typemap.py", line 99, in graphene_reducer
).format(_type.graphene_type, type)
AssertionError: Found different types with the same name in the schema: EmployeeConnection, EmployeeConnection.
```

What am I doing wrong ?

Thank you

貢獻指南

開啟貢獻指南

研究方向

Reproduce the failure by running examples/flask_sqlalchemy/app.py with the Python 2.7 setup described, then inspect schema.py around line 60 where the Graphene schema is created. Trace why EmployeeConnection is registered twice and confirm the example starts without the assertion.

由索引模型根據 Issue 內容生成。

評估

技術堆疊
flask, graphql, python, sqlalchemy
領域
api, backend
Issue 類型
缺陷
難度
3/5
預估耗時
1-2 天
活躍度
停滯
描述清晰度
需要釐清
新手友好度
25/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。