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

Fix #312 #537

Merged
merged 2 commits into from Mar 17, 2017

Conversation

Projects
None yet
4 participants
@calebmer
Copy link
Contributor

calebmer commented Mar 16, 2017

Fixes #312

cc @drager, @steventebrinke

We were mutating the options object where we weren’t supposed to. So if a user had used an object instead of a function for their options then in some cases we would be setting the variables property incorrectly. I found the bug by calling Object.freeze on options if it was not a function.

There error was reproduced in: https://github.com/steventebrinke/react-apollo-error-template/commit/e80ca5ed7a89cbed0b7d39f44d24ffb433f3e111

@calebmer calebmer changed the title Fix https://github.com/apollographql/react-apollo/issues/312 Fix #312 Mar 16, 2017

@drager

This comment has been minimized.

Copy link
Contributor

drager commented Mar 17, 2017

@calebmer: This fix solves the issue for me. Thank you!

@steventebrinke

This comment has been minimized.

Copy link

steventebrinke commented Mar 17, 2017

Thanks, this also solves it in the real app in which I discovered the bug.

@calebmer calebmer merged commit a92f608 into master Mar 17, 2017

5 checks passed

./dist/index.min.js +195 bytes (+0.40%) → 49,014 bytes
CLA Author has signed the Meteor CLA.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
coverage/coveralls Coverage decreased (-0.2%) to 92.443%
Details

@calebmer calebmer deleted the calebmer-patch-1 branch Mar 17, 2017

@calebmer

This comment has been minimized.

Copy link
Contributor Author

calebmer commented Mar 17, 2017

Released in 1.0.0-rc.3 🎉

@alfonsoperez

This comment has been minimized.

Copy link

alfonsoperez commented Mar 21, 2017

This solves for me also an instance in which a query was not being triggered if specified the options as an object. Thanks!

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