Skip to content
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

Remove mutation tracking from the store #1846

Merged
merged 3 commits into from
Jul 13, 2017
Merged

Conversation

shadaj
Copy link
Contributor

@shadaj shadaj commented Jun 30, 2017

TODO:

  • Make sure all of the significant new logic is covered by tests
  • Rebase your changes on master so that they can be merged easily
  • Make sure all tests and linter rules pass
  • Update CHANGELOG.md with your change

Copy link
Contributor

@stubailo stubailo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we could better encapsulate mutationStore, but other than that this looks like a good change!

@@ -308,6 +334,9 @@ export class QueryManager {
mutationId,
});

this.mutationStore[mutationId].loading = false;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of updating these store items directly, can we make the mutation store a class and have methods for each of these situations? Then we can operate on a slightly higher level of abstraction and call something like this.mutationStore.saveMutationError(mutationId, error) (similar to the actions we used to dispatch)

Also, I think this means we don't need the mutation-related Redux actions anymore, right? I guess we should leave them back in for better backwards compatibility?

update: updateWithProxyFn,
});

this.mutationStore[mutationId].loading = false;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above, let's wrap these in some kind of method on mutationStore

@shadaj shadaj force-pushed the no-mutations-store branch 4 times, most recently from aea2442 to c977370 Compare July 5, 2017 20:28
@shadaj shadaj self-assigned this Jul 5, 2017
@shadaj shadaj mentioned this pull request Jul 5, 2017
4 tasks
@stubailo
Copy link
Contributor

stubailo commented Jul 7, 2017

@jbaxleyiii this is a change we want to be really careful with, since it will definitely break something. For example this will break mutations in the dev tools as is since that currently reads from the store.

@stubailo
Copy link
Contributor

stubailo commented Jul 7, 2017

Can we open an issue to make sure to clean up old mutations? Right now they all stick around forever (not a regression, just a pre-existing issue).

@jbaxleyiii
Copy link
Contributor

@shadaj @stubailo can you walk me through the goals of moving this and queries out? I'll see if I can find anyone using this in the store aside from the dev tools.

@shadaj shadaj force-pushed the no-mutations-store branch 2 times, most recently from 2c739db to 3e81ea4 Compare July 7, 2017 17:35
@shadaj shadaj force-pushed the no-mutations-store branch 2 times, most recently from fd1017d to db5d7a2 Compare July 12, 2017 17:51
@shadaj shadaj force-pushed the no-mutations-store branch 3 times, most recently from 1e6e7e2 to e0a93dc Compare July 13, 2017 21:22
@jbaxleyiii jbaxleyiii merged commit 162e5cc into master Jul 13, 2017
@jbaxleyiii jbaxleyiii deleted the no-mutations-store branch July 13, 2017 23:24
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 18, 2023
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.

3 participants