including CAIT data, models and seeds
This commit is contained in:
34
relay/components/App.js
Normal file
34
relay/components/App.js
Normal file
@@ -0,0 +1,34 @@
|
||||
import React from 'react';
|
||||
import Relay from 'react-relay';
|
||||
|
||||
class App extends React.Component {
|
||||
render() {
|
||||
return (
|
||||
<div>
|
||||
<h1>Widget list</h1>
|
||||
<ul>
|
||||
{this.props.viewer.widgets.edges.map(edge =>
|
||||
<li key={edge.node.id}>{edge.node.name} (ID: {edge.node.id})</li>
|
||||
)}
|
||||
</ul>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Relay.createContainer(App, {
|
||||
fragments: {
|
||||
viewer: () => Relay.QL`
|
||||
fragment on User {
|
||||
widgets(first: 10) {
|
||||
edges {
|
||||
node {
|
||||
id,
|
||||
name,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
`,
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user