Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Copilot Lvl 3
Message 1 of 6

GraphQL giving error: "Something went wrong while executing your query. Please include `9710:1E0A:37

I am executing following query:

query ($user: String!) {
  user(login: $user) {
    email
    organizations(first: 10) {
      edges {
        node {
          id
          name
          teams(userLogins: [$user], first: 10) {
            edges {
              node {
                name
                repositories(first: 100, orderBy: {field: PERMISSION, direction: ASC}) {
                  edges {
                    permission
                    node {
                      name
                      viewerCanAdminister
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}

but it is returning error:

{
  "errors": [
    {
      "message": "Something went wrong while executing your query. Please include `9710:1E0A:37DEEC:7AD4E2:5C5154D3` when reporting this issue."
    }
  ]
}

 

If I remove orderBy clause in the query then it works fine.
Though with the query I want to get all the repositories in which user has ADMIN privilege. If you can suggest any such query, it would be of great help. TIA.

5 Replies
Community Manager
Message 2 of 6

Re: GraphQL giving error: "Something went wrong while executing your query. Please include `971

Would something like this work?

{
  viewer {
    repositories(first: 10, affiliations: [ORGANIZATION_MEMBER]) {
      edges {
        node {
          id
          name
          viewerCanAdminister
          owner {
            login
          }
        }
      }
    }
  }
}
 

 

Mark helpful posts with Accept as Solution to help other users locate important info. Don't forget to give Kudos for great content!

Copilot Lvl 3
Message 3 of 6

Re: GraphQL giving error: "Something went wrong while executing your query. Please include `971

Thanks for the reply. But it will not solve my issue. ORGANIZATION_MEMBER Affliations will show Repositories that the user has access to through being a member of an organization. This includes every repository on every team that the user is on.

 But I want repositories of organizations on which user has Admin permission.

 

GitHub Staff
Message 4 of 6

Re: GraphQL giving error: "Something went wrong while executing your query. Please include `971

Hey @vineetmimrot!

 

Taking a look at this, it appears as though there's a bug in our GitHub API that's causing this! I'm going to triage this issue for the team and get back to you as soon as we have more information. 

GitHub Staff
Message 5 of 6

Re: GraphQL giving error: "Something went wrong while executing your query. Please include `971

Hey @vineetmimrot!

 

I actually think this should have been fixed a few days ago, can you give this query another try and let me know if it works? If not, let me know, and give me the request code like 

 

`9710:1E0A:37DEEC:7AD4E2:5C5154D3`

 

so that I can debug!

Copilot Lvl 3
Message 6 of 6

Re: GraphQL giving error: "Something went wrong while executing your query. Please include `971

Hey,
Thanks it is working fine now.

One question related to this query. Since this query access organization and teams of the user, so the OAuth token must have permission of Organizations and teams (admin read:org scope), and thus it doesn't work with OAuth token having only Repositories (repo scope) permission. But if make similar kind of query via v3 REST API, it works with just OAuth token having Repositories  (repo scope) permission. Can you please tell why the permission level differs in v3 REST API and GraphQL API for accessing similar kind of objects.