Skip to content

insights: add option to create insight mutation to add to dashboard

Warren Gifford requested to merge insights/api/create-insight-with-dashboard into main

Created by: coury-clark

Closes https://github.com/sourcegraph/sourcegraph/issues/26452

Adds an argument to the GraphQL create insight mutation to optionally specify dashboards to attach at creation time.

This also includes a few small refactors to fix the DashboardStore transaction sharing mechanism, and a change to the HasDashboardPermissions args.

Missing permissions for a dashboard: CleanShot 2021-11-05 at 08 22 45@2x

Before adding the insight here is the dashboard: CleanShot 2021-11-05 at 08 23 05@2x

Here is the created insight ID (minified response) CleanShot 2021-11-05 at 08 23 13@2x

After adding insight here is the same dashboard: CleanShot 2021-11-05 at 08 23 18@2x

Merge request reports

Loading