Skip to content

Validate an insight has data series before view creation or update

Warren Gifford requested to merge insight-views-missing-series-error-msg into main

Created by: leonore

closes #30649 (closed).

Alternative error messages can be proposed!

Test plan

There are no integration tests available for the insight view resolvers, but this was tested using the API console and the following queries:

mutation {
    createLineChartSearchInsight (input: {
        options: {
            title: "test response no dashboard"
        },
        dataSeries: []
    })
    {
        view { id }
    }
}

and

mutation UpdateLineChartSearchInsight($input: UpdateLineChartSearchInsightInput!, $id: ID!) {
  updateLineChartSearchInsight(input: $input, id: $id) {
    view { id }
  }
}
# variables: 
{
  "id": "insight-id",
  "input": {
    "dataSeries": [],
    "presentationOptions": {
      "title": "test"
    },
    "viewControls": {
      "filters": {}
    }
  }
}

Each query returned the correct error message for each mutation.

Merge request reports

Loading