我正在尝试使用graffiti
express 和 mongoose 设置 graphQL 路由。
但是我收到以下错误:
Error: myColl.myField field type must be Output Type but got: undefined.
at invariant (/Users/nha/.../node_modules/graphql/jsutils/invariant.js:20:11)
at /Users/nha/.../node_modules/graphql/type/definition.js:299:39
在猫鼬模式中,类型是 : type : Schema.Types.ObjectId
。是否应该更改为其他内容?
我应该注意到版本是:
"@risingstack/graffiti": "^1.0.2"
"@risingstack/graffiti-mongoose": "^3.1.1"
"mongoose": "~3.6.20"