Skip to content

Instantly share code, notes, and snippets.

@saikat
Created November 11, 2015 17:28
Show Gist options
  • Save saikat/9d138917860c88982c6e to your computer and use it in GitHub Desktop.
Save saikat/9d138917860c88982c6e to your computer and use it in GitHub Desktop.
class AdminDashboard extends React.Component {
render() {
return <GroupCallViewer callId="R3JvdXBDYWxsOjFjOGUzOWVlLTAyOWYtNDIyMS05OTA3LTkxYWRmYmNkMjZiYw==" viewer={this.props.viewer}/>
}
}
export default Relay.createContainer(AdminDashboard, {
fragments: {
viewer: (variables) => Relay.QL`
fragment on Viewer {
${GroupCallViewer.getFragment('viewer', variables)}
}
`
}
});
export class GroupCallViewer extends React.Component {
render() {
return <GroupCall groupCall={this.props.viewer.groupCall} />
}
}
export default Relay.createContainer(GroupCallViewer, {
initialVariables: {
callId: "R3JvdXBDYWxsOjc2MmUxYTYxLTYyNDYtNGU0MS1hMjYzLWI1MzU4ZDU0NmNjMA=="
},
fragments: {
viewer: (variables) => Relay.QL`
fragment on Viewer {
groupCall(id:$callId) {
${GroupCall.getFragment('groupCall')}
}
}
`,
},
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment