Fix GraphQL double fetch on jobs table
What does this MR do and why?
Aims to fix #368158 (closed) where after a mutation a query was fetched twice, throwing a GraphQL error.
I think this is because
For mutations that change only a single entity, the cache is smart enough to update the item in place automatically, but only if we return the changed item (containing the unique identifier) in the mutation response.
Screenshots or screen recordings
Before
After
How to set up and validate locally
Reproduce bug
- Retry a job
- Navigate back to
CI/CD > Jobs
- Cancel the running job
- We get an error since query is fetched twice
OR
Just cancel a running job on CI/CD > Jobs
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Payton Burdette