Skip to content

While composing a GraphQL to list repositories in an Organisation, what should I pass as QueryString? #39403

Discussion options

You must be logged in to vote

search

query ($queryString: String!) {
  search(query: $queryString, type: REPOSITORY, first: 100) {
    repositoryCount
    edges {
      node {
        ... on Repository {
          name
        }
      }
    }
  }
}

variable

{ "queryString": "is:public archived:false org:cli" }

You are limited to the following qualifiers: Searching for repositories

  • owner qualifier is not supported
  • use org

result

{
  "data": {
    "search": {
      "repositoryCount": 7,
      "edges": [
        {
          "node": {
            "name": "cli"
          }
        },
        {
          "node": {
            "name": "oauth"
          }
        },
        {
          "node": {
            "name": "go-gh"

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by shashank-priyadarshi
Comment options

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
API and Webhooks Discussions and conversations related to APIs or Webhooks Question inactive This discussion has been automatically marked as inactive. This was formerly labeled stale.
2 participants