Something went wrong while fetching comments. Please try again.
Created by: CristinaBirkel
Closes #22818
This adds a mutation to create a dashboard.
Also:
dashboard
table called save
that, if true, persists this dashboard when the settings migration script clears out the rest. This is automatically applied to dashboards created via the API.InsightDashboard
-> InsightsDashboard
You can create a dashboard locally via the API with a query like this. You can replace the ids in the grants with whatever you have locally.
mutation {
createInsightsDashboard(input: {
title: "New dashboard created through the API!!"
grants: {
users: ["VXNlcjox"],
organizations: ["T3JnOjE="],
global: true
}
})
{
dashboard {
id
}
}
}
Then you can check that it shows up in the database, and/or query for it to confirm that it's been created. You'll have to check the database to see that the grants are there.
query insightsDashboards {
insightsDashboards(first: 10) {
nodes {
id, title
}
}
}
After you've created a dashboard, restart the service to make sure it's still there after the settings migration job is run.