Searching for query terms with spaces


#1

Had some trouble searching for queries that had spaces in the terms. “help wanted” was my goal.

Escaping the double quotes works great. For some reason it didn’t on my first attempt, so I wrote this post asking for help. No help needed, it works now.

query {
  search(first: 1, query: "label:\"help wanted\"", type: ISSUE) {
    edges {
      node {
        ... on Issue {
          title
          labels(first: 5) {
            edges {
              node {
                name
              }
            }
          }
        }
      }
    }
  }
}

#2

Hey @ondrae, thanks for sharing this! I think this would be something worth documenting in https://developer.github.com/v4/reference/query/#connections. I’ve let the team know about this internally so they can take a look. Let us know if you find anything of interest while exploring our GitHub GraphQL API, cheers!