Skip to content

Replace calls to writeQuery for client mutations in PA

What does this MR do and why?

Instead of writing directly to cache with writeQuery call to apollo, we use a local mutation and resolver. There are no user facing changes.

No tests were added because we need to do #300689 (closed) first to use resolvers instead of a mock mutate function catch all. This will be a big refactor which I plan on tackling soon, but until then we can't test that the etag is set properly because it is done in the update hook of the mutation which is never called with a mock function as a mutation (which is why that refactor is so important 😅 )

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 Frédéric Caplette

Merge request reports