Code Insights: Implement GQL update dashboard method
Created by: vovakulikov
Closes https://github.com/sourcegraph/sourcegraph/issues/27219
Context
This PR implements update dashboard methods in a way that users can change dashboard title and visibility attributes (personal, org, global dashboard visibility levels)
This PR also adds some refactoring work about dashboard types. With this PR we explicitly manage type orthogonal dashboard types (dashboard scope/visibility - personal, org level, global and dashboard-type - built-in, virtual, custom)
How to test
To be able to test this PR you have to turn on new GQL API for Code Insights. To do that go to you settings and put "codeInsightsGqlApi": true
in experimentalFeatures
field.
- Check updating the title of the dashboard
- Check updating the visibility of dashboard
- Check that non admin users can't create/update global dashboard
- Chech that FE works with latest updated dashboard data within one session (without page refreshes)