Getting a Single Project Column in GraphQL

Is it possible to get all of the information about a single column in a project via GraphQL?  Right now, it looks like I am only able to get the entire list of columns (example below).

{
  repository(owner: "microsoft" name:"calculator"){
    project(number:1){
      name
      number
      columns(first:4){
        edges{
          cursor
          node{
            name
          }
        }
      }
    }
  }
}

A workaround I have found is to hold onto the cursor associated with each column and request:

columns(first:1, before:"<next columns cursor>")

I would consider this a less than ideal solution because I’m not sure of the permanence of of the cursor value.

I’m looking for the ability to form a request similar to the one below:

{
  repository(owner: "microsoft" name:"calculator"){
    project(number:1){
      name
      number
      column(databaseID:<id>){
            name
        }
      }
    }
  }
}

Hi @benjaminwinokur,

Thanks a lot for being here! I can’t think of any obvious way to significantly improve your method. I’ll pass this feedback along to our team for more clarification and post any updates here.

Best,

This is a brutal inconsistency in the GraphQL API.

This is essentially what we’re looking for and how it’s done most everywhere else in the API:

query MoreOrgProjectColumns($orgName:String!, $project:Int!, $columnName:String!) {
  organization(login:$orgName) {
    project(number:$project) {
      column(name:$columnName) {
        ...
      }
    }
  }
}

As you can see, organization and project nodes support an identifier to return the exact object. I would expect there to be the equivalent for column as in the above example but…nope.

This actually defeats the entire purpose of the GraphQL endpoint when querying against projects, since now instead of being able to query for all information in one go, we have to re-query for every single column. :-1: