Simplify management of local state in import_groups app
What does this MR do?
This MR removes previous bloated way of managing local state in import_groups
app (based on heavy use of readFragment
/ writeFragment
) with mutations which simply return relevant data
In other words we simply allow Apollo to do the job for us, instead of managing cache layer itself
So we:
- add typedefs for easier understanding local types
- split
status
field to separate type onprogress
which allows us to update progress both by group id (overwritingprogress
field) and by progress id (by simply returning relevant progress id as mutation response)
Screenshots (strongly suggested)
N/A. No visual changes :)
Does this MR meet the acceptance criteria?
Conformity
-
📋 Does this MR need a changelog?-
I have included a changelog entry. -
I have not included a changelog entry because this is not user-facing change.
-
- [-] Documentation (if required)
-
Code review guidelines -
Merge request performance guidelines -
Style guides
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers -
Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Discovered while implementing #300098 (closed)
Edited by Illya Klymov