Skip to content

Fix GraphQL double fetch on jobs table

Payton Burdette requested to merge pb-fix-double-fetch into master

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 👇 which I found in Apollo Docs

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

Screen_Shot_2022-07-18_at_12.51.09_PM

After

fix

How to set up and validate locally

Reproduce bug

  1. Retry a job
  2. Navigate back to CI/CD > Jobs
  3. Cancel the running job
  4. 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.

Edited by Payton Burdette

Merge request reports

Loading