Skip to content

Instantly share code, notes, and snippets.

@jbaxleyiii
Last active September 18, 2016 21:14
Show Gist options
  • Save jbaxleyiii/0b4a7f1b9836f2c3bd086c7d358ee2ac to your computer and use it in GitHub Desktop.
Save jbaxleyiii/0b4a7f1b9836f2c3bd086c7d358ee2ac to your computer and use it in GitHub Desktop.
const withPollingQuery = graphql(GET_USER_WITH_ID, {
options: () => ({ pollInterval: 1000 })
});
// alternatively you can pass an object
// const withPollingQuery = graphql(GET_USER_WITH_ID, {
// options: { pollInterval: 1000 }
// });
const MyComponentWithData = withPollingQuery(MyComponent);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment