Skip to content

On Tree Fails on defaultBranchRef #24741

Discussion options

You must be logged in to vote

The target GitObject doesn’t implement Tree, you need to get its tree and query the tree’s entries.

{
  repository(owner: "sindresorhus", name: "refined-github") {
    defaultBranchRef {
      target {
        ... on Commit {
          tree {
            entries {
              name
            }
          }
        }
      }
    }
  }
}

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment