Skip to content

Instantly share code, notes, and snippets.

@gc-codesnippets
Created August 25, 2017 14:58
Show Gist options
  • Save gc-codesnippets/d9f66d67da73d666b7f660d4bea0a3eb to your computer and use it in GitHub Desktop.
Save gc-codesnippets/d9f66d67da73d666b7f660d4bea0a3eb to your computer and use it in GitHub Desktop.
import Relay from 'react-relay'
// ...
export default Relay.createContainer(TodoList, {
fragments: {
viewer: () => Relay.QL`
fragment on Viewer {
allTodoes(last: 1000) {
edges {
node {
id,
complete,
${Todo.getFragment('todo')},
},
},
},
${Todo.getFragment('viewer')},
}
`,
},
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment