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

How to query issues that match a text in their title

Solved! Go to Solution.

Hi,

 

I am new in graphql. I want to make a query or search to get all the issues that matches a text in the title. I could not find any solution or may be I did not understand the solution since I do not have much idea about graphql or GitHub graphql API.

 

Can please tell how will be the query if I want to get all the issues, suppose from react GitHub repository, where all the title of the issues has text e.g. "error"

 

Thanks.

1 Reply
Solution
Community Manager
Message 2 of 2

Re: How to query issues that match a text in their title

The search connection query parameter uses the same syntax as the search box on github.com. Therefore this should work for you:

 

{
  search(query: "repo:lee-dohm/test-repo in:title test", type: ISSUE, first: 100) {
    nodes {
      ... on Issue {
        number
        title
        body
      }
    }
  }
}

I hope that helps!