[英]relay-compiler unable to extract and use graphql queries in Typescript
[英]Is there way to use Relay without GraphQL?
我正在我的React应用程序中尝试Relay,它默认使用GraphQL。 看起来像这样( Score
是一些React.js组件):
Score = Relay.createContainer(Score, {
fragments: {
score: () => Relay.QL`
fragment on Score {
initials,
score,
}
`,
},
});
问题是:我可以使用自定义API函数将数据返回为片段吗? 像这样:
Score = Relay.createContainer(Score, {
fragments: {
score: myCustomFunction(), // It will return a dataset.
},
});
还没有。 在GitHub问题中讨论了使用“本地”数据扩展服务器架构的支持。
同时,您有两个选择:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.