sourcegraph/sourcegraph-public-snapshot

insights: Extend/change add/remove gql mutation in a way to handle list of insights per one mutation

开放

#32,194 创建于 2022年3月4日

 (4 条评论) (0 个反应) (1 位负责人)Go (1,374 个派生)auto 404
backendcode-insightsgood first issue

仓库指标

星标
 (10,290 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

Related GH thread https://github.com/sourcegraph/sourcegraph/issues/23065#issuecomment-1057858501

Background

In the nutshell, at the moment addInsightViewToDashboard and removeInsightViewFromDashboard mutations take only one insight id. But it would be better from the performance point of view for the frontend to have mutations that could take a list of insights for adding or removing them to/from the dashboard.

A good use case for such mutations might be our "Add or remove insights" modal view. At the moment we are sending a package (bulk) GQL mutation request for each added/removed insight there. With a new mutation, we could just run one mutation for adding and one for removing.

贡献者指南