Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Ground Controller Lvl 1
Message 1 of 2

API v4: releaseAssets connection is empty

Hey there! Trying a query on the repository.releases.releaseAssets GraphQL fields from the explorer, and it seems the releaseAssets field is returning empty (for both edges and nodes), when the release should have associated assets.

Pulling from https://github.com/Microsoft/TypeScript/releases with the following query:

 

 

{
  repository(owner: "Microsoft", name: "TypeScript") {
    releases(first: 100, orderBy: {field: CREATED_AT, direction: DESC}) {
      nodes {
        id
        tagName
        releaseAssets(first: 100) {
          edges {
            node {
              id
            }
          }
        }
      }
    }
  }
}


No errors reported, and didn't see any documentation that this might be an access protected field - so wanted to see if this was a bug? Thanks!

 

1 Reply
Community Manager
Message 2 of 2

Re: API v4: releaseAssets connection is empty

This appears to be an access protected field. Because when I rewrite the query to use an owner and repo name that I have access to, I see release assets. 

 

I used the following query:

 

{
  repository(owner: "atom", name: "atom") {
    releases(first: 100, orderBy: {field: CREATED_AT, direction: DESC}) {
      nodes {
        id
        tagName
        releaseAssets(first: 100) {
          nodes {
            id
            createdAt
            name
          }
        }
      }
    }
  }
}

Let us know if you have more questions.