Include original visualization reference in analytics dashboard response

Problem to solve

The current GraphQL response returns a hydrated dashboard object - it includes the full visualization. This is useful because we don't want to load each visualization in the frontend, however for saving dashboards we want to pass back the original dashboard configuration with modifications.

Proposed solution

We need to add the original visualization reference from the dashboard YAML to the GraphQL response by either:

  • Add an additional field visualizationReference to ProductAnalyticsDashboardPanel.
  • Add an additional field reference to ProductAnalyticsDashboardVisualization.

Implementation plan

backend 1️⃣

  • Update ProductAnalytics::Panel with the reference.
  • Add the new GraphQL field.
  • Update specs.
Edited by Jiaan Louw