-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
refactor data reducer #383
Conversation
@@ -249,6 +249,7 @@ export class QueryManager { | |||
variables, | |||
mutationId, | |||
fragmentMap: queryFragmentMap, | |||
mutations: this.getApolloState().mutations, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need to pass in all of the state about mutations and queries into the reducer - we only need the particular query this result is associated with. Same goes for the rest.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okay so you wanna move that functionality out of data as well? so instead of returning mutationId or queryId in actions, we just cruise with the actual mutation/query we're dealing with?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we still need mutationId
in the store to keep track of loading/error state.
I think this change is great, we just should only pass in the data we actually need, which is basically only the single mutation, not all mutations ever sent.
Yeah I'll do that tonight |
Closing this, Amanda is on it in #417 |
#370