Created
August 25, 2017 14:58
-
-
Save gc-codesnippets/d9f66d67da73d666b7f660d4bea0a3eb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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