Huy's Notes
List all files in a folder of a Github repo using GraphQL

List all files in a folder of a Github repo using GraphQL

Let's say, the files are located in ./content folder:

query { 
  search(type:REPOSITORY, first:1, query:"huytd/wiki") {
    edges {
      node {
        ... on Repository {
          name,
          object(expression:"master:content") {
            ... on Tree {
              entries {
                name,
                type
              }
            }
          }
        }
      }
    }
  }
}

Referred in


If you think this note resonated, be it positive or negative, please feel free to send me an email and we can talk.