Skip to content
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.

Fixed withMutation hoc allowing updates to result #3431

Merged
merged 6 commits into from Sep 13, 2019

Conversation

tim-stasse
Copy link
Contributor

@tim-stasse tim-stasse commented Aug 30, 2019

Fixes #3250

Checklist:

  • If this PR is a new feature, please reference an issue where a consensus about the design was reached (not necessary for small changes)
  • Make sure all of the significant new logic is covered by tests
  • If this was a change that affects the external API used in GitHunt-React, update GitHunt-React and post a link to the PR in the discussion.

@hwillson
Copy link
Member

Thanks for working on this @tim-stasse! Unfortunately, we can't fully remove ignoreResults like this, as the test failures here have shown. ignoreResults helps prevent extra un-necessary re-renders in certain cases, which is why it's enabled by default. An alternative workaround for now is to allow the ignoreResults setting to be overridden by developers. This will help address the issue in #3250, and is backwards compatible. I'll add changes for this here. Thanks again!

In some cases it can be beneficial to receive result updates in
`withMutation`. This commit tweaks `withMutation` such that
developers can override the currently always on `ignoreResults`
setting.
@hwillson hwillson merged commit db0fd27 into apollographql:master Sep 13, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

graphql(mutation) HOC result prop is not updated
2 participants