insights: Return more helpful error message when `createLineChartSearchInsight` is called without series
Created by: CristinaBirkel
Running this query:
mutation {
createLineChartSearchInsight (input: {
options: {
title: "test response no dashboard"
},
dataSeries: []
})
{
view { id }
}
}
Returns this error:
{
"errors": [
{
"message": "insight not found",
"path": [
"createLineChartSearchInsight",
"view"
]
}
],
"data": null
}
If we want to have the constraint that insight views must be created with at least one series, a more helpful error message here would be nice.
Note: This also applies to updateLineChartSearchInsight
as well.
CreateLineChartSearchInsight mutation UpdateLineChartSearchInsight mutation