It would be nice to be able to explore the identity chain within the web UI.
I think the first thing we might want to expose is the current identity, to show the current user name and avatar in the UI.
The identities should be exposed at the Repository scope in the API.
Related: #55
Sladyn (sladyn98) commented
@sandhose Dont you think it would be exposed as a completely different scope as it is a part of a bug itself.
And instead of doing such a thing we could ask the user to connect himslef to one of his accounts either on github or gitlab and pick up the username and avatar from there itself instead of exposing it in our bugs graphQL api.
Michael Muré (MichaelMure) commented
@sladyn98 Identities are now in their own chain of data and each bug operation only store an ID, instead of the whole identity (I'm yet to update the documentation).
@sandhose yeah, that make sense and should be fairly easy to pull off.
So, something like this:
type Repository {
allBugs(
"""Returns the elements in the list that come after the specified cursor."""
after: String
"""Returns the elements in the list that come before the specified cursor."""
before: String
"""Returns the first _n_ elements from the list."""
first: Int
"""Returns the last _n_ elements from the list."""
last: Int
"""A query to select and order bugs"""
query: String
): BugConnection!
bug(prefix: String!): Bug
allIdentities(
"""Returns the elements in the list that come after the specified cursor."""
after: String
"""Returns the elements in the list that come before the specified cursor."""
before: String
"""Returns the first _n_ elements from the list."""
first: Int
"""Returns the last _n_ elements from the list."""
last: Int
): IdentityConnection!
identity(prefix: String!):Identity
}
Quentin Gliech (sandhose) commented
@MichaelMure LGTM, just add something to get the current identity. Right now I don't really want to list all the identities in the UI, but rather have something to display informations on the current user.
Sladyn (sladyn98) commented
@MichaelMure perfect 👍 just one question do you have a command in the identity section like current userID that would spit out the current USERID?
Michael Muré (MichaelMure) commented
do you have a command in the identity section like current userID that would spit out the current USERID
git bug user will do that for you
Michael Muré (MichaelMure) commented
@sandhose done in 15c258cdc4ba37820362a44dfc2636ed1ff92b4c