New visualizations are not added to the availableVisualizations local Apollo cache
Summary
When using the visualization designer to create a new visualization, the changes are not propagated into the local Apollo cache.
This can result in the new visualization not being in the list of available visualizations when editing a dashboard until the page is refreshed.
Steps to reproduce
- Visit a product analytics dashboard. This ensures availableVisualizations have been fetched and cached.
- Using the breadcrumbs, browse up to analytics dashboards. (dont reload the page or use a bookmark to navigate)
- Click Visualization Designer
- Create a new visualization, and save it
- Using the breadcrumbs, browse up to analytics dashboards
- Click New Dashboard
- Click Add visualization
- Notice your new visualizations is not in the list
- Refresh the page, and notice it is now in the list
Proposal
When saving the new visualization, update the Apollo cache.
We already do this for dashboards, a similar approach would work for visualizations.