Author name not showing up in GraphQL


#1

HI,
I was using the following query in GraphQL :slight_smile:
{
repository(owner: “talk-to”, name: “flock-notes”) {
issues(states:OPEN, first: 10) {
totalCount
edges {
node {
number
author {
login
name
}
}
}
}
}
}

But for some reason now i see that name is not longer present in author.
I have two questions :

  1. why was it removed and where can i track such changes ?
  2. How do i now retrieve the name of the author along with login name…
    As this may be required…

Thanks


#2

Hi @robinsuri,

  1. How do i now retrieve the name of the author along with login name…

In the context of your query, the author being returned on an issue conforms to the Author interface, which does not have name. That being said, because this is an interface, you could use an inline fragment to ask for the entire user type:

query {
  repository(owner: "rails", name: "rails") {
    issues(states: OPEN, first: 10) {
      totalCount
      edges {
        node {
          number
          author {
            ... on User {
              name
              login
            }
          }
        }
      }
    }
  }
}
  1. why was it removed and where can i track such changes ?

Right now we don’t have an automated way of tracking changes, but you could periodically execute an introspection query and diff the results to see the modifications to the schema.

I hope this helps,
Brooks