insights: UpdateInsightsDashboard does not check to see if dashboard exists
Created by: CristinaBirkel
Repro:
- Call
UpdateInsightsDashboard
on a dashboard that does not exist.
Expected: dashboard not found
Actual: got nil for non-null
There are multiple ways to fix this, but it seems to be because the validation returns hasPermission=true
when the dashboard doesn't exist.
Example query:
mutation updatedb {
updateInsightsDashboard(id:"ZGFzaGJvYXJkOnsiSWRUeXBlIjoiY3VzdG9tIiwiQXJnIjo4NTY4Njg2OH0=", input:{}) {
dashboard {
id
}
}
}
{
"errors": [
{
"message": "graphql: got nil for non-null \"InsightsDashboardPayload\"",
"path": [
"updateInsightsDashboard"
]
}
],
"data": null
}