New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add shouldResubscribe option #389

merged 2 commits into from Jan 5, 2017


None yet
3 participants
Copy link

gilesbradshaw commented Jan 3, 2017

A should resubscribe option makes subscription queries optionally resubscribe when the props change..

I use it like this:

  subscription  - blah blah ....

const NODE_QUERY = gql`
  query  - blah blah ....

const _Node = (props) => <Blah />

const options = {
  shouldResubscribe: (props, nextProps) => {
    // if the id property changes then we need to resubscribe..
    return !==
const Node = compose(
  graphql(NODE_SUBSCRIPTION_QUERY, options),

This comment has been minimized.

Copy link

meteor-bot commented Jan 3, 2017

@gilesbradshaw: Thank you for submitting a pull request! Before we can merge it, you'll need to sign the Meteor Contributor Agreement here:


This comment has been minimized.

Copy link

jbaxleyiii commented Jan 5, 2017

@gilesbradshaw nice! can you add this to the docs site as well?

@jbaxleyiii jbaxleyiii merged commit 92caa83 into apollographql:master Jan 5, 2017

3 checks passed

CLA Author has signed the Meteor CLA.
continuous-integration/travis-ci/pr The Travis CI build passed
coverage/coveralls Coverage increased (+0.3%) to 94.664%

This comment has been minimized.

Copy link
Contributor Author

gilesbradshaw commented Jan 5, 2017

sure! apollostack/react-docs#138

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment