GraphQL ExternalLink should expose kind: ExternalServiceKind (enum) instead of serviceType: String #14979
Labels
api
Sourcegraph GraphQL API
estimate/2d
good first issue
Good for newcomers
team/core-application
Core Application team
Milestone


ExternalLinkin GraphQL currently only exposes theserviceTypeas a string. This has caused a lot of headache in the frontend as we need to enumerate it to show appropiate icons, show the right browser extension install alerts, etc. Every time I have to go dig up the possible values in the backend, which is non-trivial because we have many properties namedserviceTypethat are different things.In a recent case this caused our alert logic to not be aware that external services like AWS code commit exist (which we don't support in the browser extension), resulting in us showing alerts to install the browser extension despite that code host not being supported. We could have avoided that mistake with more diligence of course, but I'm convinced that would not have happened had the property been an enum, so that the possible values would have been easily visible in TypeScript types/hovers/autocompletion.
Expected:
The text was updated successfully, but these errors were encountered: