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

Fix apollo cache for workflow cmd+k #9549

Merged
merged 1 commit into from
Jan 10, 2025

Conversation

thomtrp
Copy link
Contributor

@thomtrp thomtrp commented Jan 10, 2025

When a workflow was activate, the previous activated version was still available in cmd+k
This is because we were only updating entities in cache after activation.
We also need to update the queries stored in cache, because this is where the cmd+k look to know which workflow is active.

Enregistrement.de.l.ecran.2025-01-10.a.17.48.25.mov

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary

This PR fixes an Apollo cache issue where previously activated workflow versions remained visible in cmd+k after activating a new version, by improving cache update logic.

  • Added filtering in useActivateWorkflowVersion.ts to identify previously active workflow versions that need to be archived
  • Implemented triggerUpdateRecordOptimisticEffect to ensure cache queries are properly updated when archiving old versions
  • Modified cache update logic to handle both entity and query-level updates for workflow version status changes

1 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings | Greptile

@thomtrp thomtrp force-pushed the tt-fix-multiple-workflows-to-run branch from 4c4d996 to 4186cdb Compare January 10, 2025 17:00
Copy link
Contributor

@bosiraphael bosiraphael left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@charlesBochet charlesBochet merged commit 4efa959 into main Jan 10, 2025
21 of 23 checks passed
@charlesBochet charlesBochet deleted the tt-fix-multiple-workflows-to-run branch January 10, 2025 17:33
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.

3 participants