【发布时间】:2016-01-25 00:03:50
【问题描述】:
我正在关注Relay 101: Building A Hacker News Client 教程。
但是在这个过程中我得到了错误
AssertionError: relay-101/index.js: getBabelRelayPlugin():
Expected schema to be an object with a `__schema` property.
at getSchema (/Users/ruseel/p/spike/relay-101/node_modules/babel-relay-plugin/src/getBabelRelayPlugin.js:224:3)
at NodePath.Plugin.visitor.TaggedTemplateExpression (/Users/ruseel/p/spike/relay-101/node_modules/babel-relay-plugin/src/getBabelRelayPlugin.js:104:26)
...
经过一番挖掘(getBabelRelayPlugin.js 中的console.log),我注意到getBabelRelayPlugin.js 中的自省变量
const introspection = typeof schemaProvider === 'function' ?
schemaProvider() :
schemaProvider;
是这样的。
{"errors":[{"message":"Must provide query string."}]}
但我不知道为什么会这样? 为什么会出现这个错误?
任何方向将不胜感激。
【问题讨论】:
-
现在我正在尝试与我的最终来源github.com/clayallsopp/relay-101 进行比较。
标签: relay