sourcegraph/sourcegraph-public-snapshot

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

Aberta

#32.194 aberto em 4 de mar. de 2022

 (4 comentários) (0 reação) (1 responsável)Go (1.374 forks)auto 404
backendcode-insightsgood first issue

Métricas do repositório

Stars
 (10.290 estrelas)
Métricas de merge de PR
 (Métricas PR pendentes)

Description

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.

Guia do colaborador