1
我正在关注Relay 101: Building A Hacker News Client Tutorial。AssertionError:relay-101/index.js:getBabelRelayPlugin():预期的模式是一个带有__schema的对象
但在这个过程中我得到了错误
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."}]}
但我不知道为什么会发生这种情况? 这个错误为什么会发生?
任何方向将不胜感激。
现在我试图与最终的源https://github.com/clayallsopp/relay-101与我的比较。 – ruseel