GraphQL ExternalLink should expose kind: ExternalServiceKind (enum) instead of serviceType: String
Created by: felixfbecker
ExternalLink
in GraphQL currently only exposes the serviceType
as 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 named serviceType
that 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:
kind: ExternalServiceKind