Add external service states to the StatusMessages GraphQL endpoint
Created by: artemruts
Description
Redesigned notifications need to track two additional external service states to show the new UI:
- if the user has any external services
- if external services have any synced repositories
Currently, StatusMessages
GraphQL endpoint doesn't provide that information, API console link.
To fetch additional states we have to rely on the ExternalServices
GraphQL query, API console link.
This is not ideal as we double the number of network calls and fetch extra data.
Acceptance Criteria
The StatusMessages
GraphQL endpoint should be aware if the user has added any external services and if those services have repositories.
It could look something like this:
query StatusMessages {
statusMessages {
... on ExternalServices {
nodes {
id
kind
displayName
repoCount
}
totalCount
}
}
}
The endpoint returns the ExternalServices
state for the currently authenticated user.