Created
August 25, 2017 15:04
-
-
Save gc-codesnippets/cdfdd53f45cc0b3af69f9980bfb48a70 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(Todo, { | |
fragments: { | |
todo: () => Relay.QL` | |
fragment on Todo { | |
id, | |
complete, | |
text, | |
${ChangeTodoStatusMutation.getFragment('todo')}, | |
${RemoveTodoMutation.getFragment('todo')}, | |
${RenameTodoMutation.getFragment('todo')}, | |
} | |
`, | |
viewer: () => Relay.QL` | |
fragment on Viewer { | |
id, | |
${ChangeTodoStatusMutation.getFragment('viewer')}, | |
${RemoveTodoMutation.getFragment('viewer')}, | |
} | |
`, | |
}, | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment