Query labels by exact names

I am trying to run simple query

{
  repository(name: "graphiql", owner: "graphql") {
    labels(first: 10, query: "plugin proposal") {
      totalCount
      edges {
        node {
          name
          color
        }
      }
    }
  }
}

Theoretically it should return one node, but it returns all partial matches:

{
  "data": {
    "repository": {
      "labels": {
        "totalCount": 3,
        "edges": [
          {
            "node": {
              "name": "plugin proposal",
              "color": "fbca04"
            }
          },
          {
            "node": {
              "name": "proposal",
              "color": "1db4e2"
            }
          },
          {
            "node": {
              "name": "potential plugin",
              "color": "efd1ac"
            }
          }
        ]
      }
    }

Could someone point me to where I could get more info on how the query string must be composed?

After spending coulple of days looking for an answer I stumbled upon it by accident. Looking at the url of the search UI gave me an idea:
https://github.com/graphql/graphiql/labels?q=%22plugin+proposal%22+

So the correct query would be like this:

{
  repository(name: "graphiql", owner: "graphql") {
    labels(query: "\"plugin+proposal\"+", first: 10) {
      nodes {
        name
        id
      }
    }
  }
}
3 Likes

Awesome @eniks! Thank you so much for coming back to share what worked for you!