Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Stale variables when combining `pollInterval`, `skip`, `forceFetch` #374
This seems similar to #358 (but possibly unrelated).
Here is my situation:
But, if I click the button again, this happens:
Steps to Reproduce
I've isolated this in a reproduction case:
To keep things simple I don't do a mutation, just controlling props with
I should be able to combine
Thank you @jbinto for the excellent reproduction.
Can confirm the problem and also that it's not AC (see this branch: https://github.com/tmeasday/apollo_polling_bug/tree/pure-apollo-client)
Ok, so I think the issue is here: https://github.com/apollostack/react-apollo/blob/master/src/graphql.tsx#L343-L345
It assumes that we've either (a) just created the query with the current options and need to create a subscription or (b) we may be changing the options and the subscription should exist.
This is obviously third case that needs to be dealt with.