GraphQL wildcard search

Wildcard (or even exact) search not supported by GraphQL

Is there really no way to do a wildcard-search (or even an exact-search) in GitLabs issues?

query ($projectName: ID!){
  project(fullPath: $projectName) {
    name
    issues(title: "title%") {
      nodes {
        title
        description
      }
    }
  }
}

results in

{
    "errors": [
        {
            "message": "Field 'issues' doesn't accept argument 'title'",

I found this is working:

{
  project(fullPath: "rev/foo") {
    name
    issues(search: "test") {
      edges {
        node {
          iid
          title
          description
        }
      }
    }
  }
}

It will do a case-insensitive search on both issue title and description.

1 Like

And how to extend by filtering on issue-state? state: OPEN (or similar) results in:
Argument 'state' on Field 'issues' has an invalid value. Expected type 'IssuableState'.

Solution (thanks to Graph-Explorer: state: opened

The built-in documentation is your friend :slight_smile: