Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Apollo Cache When Updating FM Settings #2385

Merged
merged 1 commit into from
May 10, 2022

Conversation

adrians5j
Copy link
Member

@adrians5j adrians5j commented May 8, 2022

Changes

When a user would update the FM settings, for some parts of the Admin Area app, the changes would take effect only if the user would refresh the screen. A simple example is:

  1. user uploads a file, and "max file exceeded" error is shown to the user
  2. user navigates to FM's settings, updates the "Maximum file upload size"
  3. user navigates back to FM, tries to upload the same file again, and still, the "max file exceeded" error would be shown to the user
  4. only after refreshing the screen, the user would be able to upload the file

image

This is because the Apollo cache would not get updated with new values (after the form has been submitted and the underlying GraphQL mutation has been successfully completed).

So, once the GraphQL mutation has been completed, now we make sure the Apollo cache is updated with the new values.

How Has This Been Tested?

Manual (will add Cypress).

Documentation

Changelog.

@adrians5j adrians5j self-assigned this May 8, 2022
@adrians5j adrians5j changed the base branch from next to 4-fix-multiac-type May 9, 2022 05:55
@Pavel910 Pavel910 self-requested a review May 10, 2022 09:31
@adrians5j adrians5j merged commit bdcbfce into 4-fix-multiac-type May 10, 2022
@adrians5j adrians5j deleted the update-settings-apollo-cache-update branch May 16, 2022 10:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants