Skip to content

Navigation Menu

Sign in
Appearance settings
Sign up
Appearance settings
Discussion options

There is currently no way to fetch the languages a specific user uses. The current repositories/languages object of the GraphQL API will return the languages of a repository. I think allowing users to filter only the languages used in commits made by their user account would improve the GraphQL API. It would provide users with more accurate Language proficiency information and improve the stats displayed by repositories like github-readme-stats. I'm unsure if this is technically possible given the current GraphQL design and performance requirements and the linguist tool but here is my proposal.

Current behaviour

Current graphQL query:

query userInfo($login: String!) {
  user(login: $login) {
    repositories(ownerAffiliations: OWNER, isFork: true, first: 100) {
      nodes {
        name
        languages(first: 10, orderBy: {field: SIZE, direction: DESC}) {
          edges {
            size
            node {
              color
              name
            }
          }
        }
      }
    }
  }
}

Current GraphQL variables

{"login": "rickstaa"}

This will return the language stats per repository.

New behaviour

Maybe an attribute like isUser: true could be added for fetching user-specific language information.

New graphQL query:

query userInfo($login: String!) {
  user(login: $login) {
    repositories(ownerAffiliations: OWNER, isFork: true, first: 100) {
      nodes {
        name
        languages(first: 10, orderBy: {field: SIZE, direction: DESC}, isUser: true) {
          edges {
            size
            node {
              color
              name
            }
          }
        }
      }
    }
  }
}

New GraphQL variables

{"login": "rickstaa"}
You must be logged in to vote

Replies: 107 comments · 7 replies

Comment options

I fully concur with the assessment and feature request: For many purposes the languages a user uses is of interest, not languages used in a repository. This data is currently not accessible via the GraphQL API!

You must be logged in to vote
0 replies
Comment options

I agree that this should be a feature.

You must be logged in to vote
0 replies
Comment options

Another nice feature would be an easy way to get the most recent commit date when inside Tree entries:

https://www.reddit.com/r/graphql/comments/1338vwr/new_to_graphql_and_trying_to_understand_github/

You must be logged in to vote
0 replies
Comment options

I buy this idea because I do a lot of work as a contributor to organizations repository, that shoul reflect on my profile as well

You must be logged in to vote
0 replies
Comment options

@Eminentzeal, please look at issue anuraghazra/github-readme-stats#1!

You must be logged in to vote
0 replies
Comment options

👍 Agreed

You must be logged in to vote
1 reply
@Temerold
Comment options

I am voicing my support in an additional way.

Comment options

I agree. I'm just learning to code and fork several projects to do so. After four projects and four months, the languages I used aren't in my top language stats. Any updates?

You must be logged in to vote
0 replies
Comment options

This would be super useful

You must be logged in to vote
0 replies
Comment options

This should, indeed, be a feature.

You must be logged in to vote
0 replies
Comment options

Forks are as important for GH as own repos, so definitely should be a thing.

You must be logged in to vote
2 replies
@Eagle3386

This comment was marked as spam.

@Destroy666x
Comment options

@Eagle3386 sorry, but you show blatant ridiculousness here, spamming the whole comment section with way more useless repeated comment. People should be able to comment whatever they want under a feedback discussion. While "+1" type of comments are not too useful, you commented mostly on a bunch that added some point(s). I have no idea what encouraged you to stop us in a hypocritical and comedic way.

Also, do you realize:

  • you can turn email notifications off
  • you can unsubscribe from any discussions, knowing that 99% of replies in them will be support for the idea
    ?
Comment options

I cannot agree more; it indeed will reflect more precisely and could allow counting for forks and other behaviours, especially when the repository is company-based and users are just collaborators.

You must be logged in to vote
0 replies
Comment options

Thumbs up to this. My current stats look like I can only write Python but that is far from the truth as I use a large variety of languages but in company owned orgs.

You must be logged in to vote
4 replies
@Eagle3386

This comment was marked as spam.

@BB-BenBridges
Comment options

Which I have done as well. Adding a further comment to show the different reasons this would be useful when this feature is developed could be useful to the devs. Certainly does not hurt.

@Eagle3386

This comment was marked as spam.

@BB-BenBridges
Comment options

"new comments cause mails" - like the 10 emails I just got from you? 😄 It would be one thing if there were multiple new comments on this per day, but it's been fairly steady at one a week. If the mods disagree, they can delete comments and pin one asking only to up-vote and not comment.

Not trying to be aggressive as I can see you were just trying to help. Just trying to show you the slight hypocrisy in your comment. The mods of this repo can manage the notifications if its a big issue for them. Same goes for anyone subbed to this issue.

Comment options

+1, this would be a super handy addition.

You must be logged in to vote
0 replies
Comment options

support this! 👍

You must be logged in to vote
0 replies
Comment options

Really need this 👍

You must be logged in to vote
0 replies
Comment options

+1

You must be logged in to vote
0 replies
Comment options

+1

You must be logged in to vote
0 replies
Comment options

+1

You must be logged in to vote
0 replies
Comment options

+1

You must be logged in to vote
0 replies
Comment options

+1

You must be logged in to vote
0 replies
Comment options

+1

You must be logged in to vote
0 replies
Comment options

+1

You must be logged in to vote
0 replies
Comment options

+1

You must be logged in to vote
0 replies
Comment options

+1

You must be logged in to vote
0 replies
Comment options

+1

You must be logged in to vote
0 replies
Comment options

+1

You must be logged in to vote
0 replies
Comment options

+1

You must be logged in to vote
0 replies
Comment options

+1

You must be logged in to vote
0 replies
Comment options

+1

You must be logged in to vote
0 replies
Comment options

+1

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
other General topics and discussions that don't fit into other categories, but are related to GitHub Product Feedback Share your thoughts and suggestions on GitHub features and improvements
Morty Proxy This is a proxified and sanitized view of the page, visit original site.