Skip to content

Instantly share code, notes, and snippets.

@peterpme
Last active October 10, 2017 18:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save peterpme/162e6415a2892ee837950ae566ec7a1e to your computer and use it in GitHub Desktop.
Save peterpme/162e6415a2892ee837950ae566ec7a1e to your computer and use it in GitHub Desktop.
Apollo Tote Examples
<ApolloTote
query={`
query {
user {
id
}
}
`}
test={data => !!(data && data.user && data.user.id)}
handleFail={() => Store.dispatch({ type: 'LOG_OUT' })}
handlePass={() => Store.dispatch({ type: 'LOG_IN' })}
renderError={error => this._renderError(error)}
renderLoading={() => <App.Loading />}
render={() => <App />}
/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment