insights: don't return all insights on a dashboard when there are none
Created by: CristinaBirkel
Closes https://github.com/sourcegraph/sourcegraph/issues/26450
Description
In the issue, I thought it was a bug with the store's Get
function, but it looks like that's working as intended based on the tests. So instead I just addressed this in the DashboardInsightViewConnectionResolver
where the bug was occurring. Now we only call GetMapped
if there are any attached insight views.
Testing Steps
Create a dashboard with no insight views attached to it. Then query for it and make sure no views are returned.