-
Notifications
You must be signed in to change notification settings - Fork 3
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: manually update apollo cache on activity completion #138
fix: manually update apollo cache on activity completion #138
Conversation
mohsinht
commented
Jul 21, 2023
•
edited
Loading
edited
- Sometimes the cache is not properly updated in case of form submission or checklist submission. The same completed activity is shown to the user again. We've been observing this in DataDog tests and Checkly. To solve this issue, I've added a hook that forces the Apollo Cache to update the session activities manually. (see loom)
- Please note that the cache was previously updated by the subscriptions only. With this change in the PR, we now update the cache when a form/checklist is submitted + when an activity is updated from subscription.
- We also had a tech debt that we are using indices to navigate through the activities instead of their IDs. This PR also includes a small refactor that addresses this change.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
…github.com:awell-health/hosted-pages into refactor/use-activity-id-instead-of-activity-index
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see that you've updated the hooks associated with mutations for messages, forms and checklists. Does the cache update hook need to be used for other user activity types/hooks? e.g. cal.com booking activity?
…tivities + address comments in PR
Yes, I was adding cache update function where we call |
…github.com:awell-health/hosted-pages into refactor/use-activity-id-instead-of-activity-index