Phi*_*pak 3 reactjs graphql relayjs
我正在我的React应用程序中尝试Relay,它默认使用GraphQL.它看起来像这样(Score
是一些React.js组件):
Score = Relay.createContainer(Score, {
fragments: {
score: () => Relay.QL`
fragment on Score {
initials,
score,
}
`,
},
});
Run Code Online (Sandbox Code Playgroud)
问题是:我可以使用自定义API函数将数据返回到片段中吗?像这样:
Score = Relay.createContainer(Score, {
fragments: {
score: myCustomFunction(), // It will return a dataset.
},
});
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
1389 次 |
最近记录: |