sourcegraph / sourcegraph-public-snapshot

Code AI platform with Code Search & Cody
https://sourcegraph.com
Other
10.1k stars 1.29k forks source link

insights: separate fetch dashboard by id into a distinct query #26794

Open coury-clark opened 2 years ago

coury-clark commented 2 years ago

Currently in the insights graphql api the operation to fetch many dashboards insightsDashboards is the same operation to fetch a single dashboard with the id argument. This issue is to clean up a little bit and provide a separate query insightDashboard to return just a single dashboard.

github-actions[bot] commented 2 years ago

Heads up @joelkw @felixfbecker @vovakulikov @unclejustin - the "team/code-insights" label was applied to this issue.

CristinaBirkel commented 2 years ago

Just a note that we also have this same issue with the insightViews query. Also, with a separate query we can include a friendly error message if the user doesn't have permission to view that particular dashboard/insight, whereas now it just returns an empty array.