Fetch system notes when changing assignee
What does this MR do?
A small performance improvement.
When the assignee changes for an alert, a system note is added. Currently we wait for the mutation request to return successfully, then perform a full refetch of the alert data to get new system notes.
Downsides:
- Does an extra request, so 2 round trips in total.
- Fetches data that does not change.
- Adds work for the db - to retrieve the same data more than once.
One of the advantages of graphql is being able to specify exactly what you need in a query. It also allows us to fetch new data in the same request as a mutation. We can leverage these two properties to slightly improve alert detail page performance
No visual change in this MR. You can verify the change by changing an alert assignee and seeing that it now makes one network call instead of two.
Issue: #225445 (closed)
Screenshots
Does this MR meet the acceptance criteria?
Conformity
- [n/a] Changelog entry
- [n/a] Documentation (if required)
-
Code review guidelines -
Merge request performance guidelines -
Style guides - [n/a] Database guides
- [n/a] Separation of EE specific content
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 - [n/a] Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
- [n/a] Label as security and @ mention
@gitlab-com/gl-security/appsec
- [n/a] The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
- [n/a] Security reports checked/validated by a reviewer from the AppSec team