Status and Label column not getting Using Graph QL Query

Hi Team,

I am trying to add Column using Graph QL Query in my API
The Query is:

mutation { create_column( board_id: ${boardId}, title: "${column.title}", column_type: ${column.type} ) { id title } }

But, when I tried to add column with the below following type its give me error. And the type of columns has been fetched with the help of Graph QL query only.

Title: Checkbox, type: boolean
Title: monday Doc, type: doc
Title: Priority 1, type: color
Title: Timeline, type: timerange
Title: Label, type: color
Title: Numbers, type: numeric
Title: People, type: multiple-person
Title: Status, type: color
Title: Tags, type: tag
Title: Creation Date, type: pulse-log
Title: Ticket Number, type: pulse-id
Title: Project Phase, type: board-relation
Title: Client List, type: board-relation
Title: Task Time (Hr), type: lookup

Please provide me the solution for the same.

hi @Shreyas13398

Do you run this on API version 2023-07 or 2023-10. In -10 version a lot of column types has been changed, see: Breaking change: Type change for `type` field/argument on `columns` queries

I am using version 2023-10 with this endpoint https://api.monday.com/v2

{
boards(ids: 5191292078) {
columns {
title
type
}
}
}

Response from API Playground:

{
“data”: {
“boards”: [
{
“columns”: [
{
“title”: “Name”,
“type”: “name”
},

      {
        "title": "Assigned to",
        "type": "multiple-person"
      },
      {
        "title": "Requested By",
        "type": "multiple-person"
      },
      {
        "title": "Task Type",
        "type": "board-relation"
      },
    
      {
        "title": "Complexity",
        "type": "rating"
      },
     
      {
        "title": "Ticket Number",
        "type": "pulse-id"
      },
      {
        "title": "Task Documentation",
        "type": "link"
      },
      {
        "title": "Creation Date",
        "type": "pulse-log"
      },
      {
        "title": "Tags",
        "type": "tag"
      },
      {
        "title": "Status",
        "type": "color"
      },
      {
        "title": "Text",
        "type": "text"
      },
      {
        "title": "People",
        "type": "multiple-person"
      },
      {
        "title": "Dropdown",
        "type": "dropdown"
      },
      {
        "title": "Date",
        "type": "date"
      },
      {
        "title": "Numbers",
        "type": "numeric"
      },
      {
        "title": "Files",
        "type": "file"
      },
      {
        "title": "Formula",
        "type": "formula"
      },
      {
        "title": "Connect boards",
        "type": "board-relation"
      },
      {
        "title": "Checkbox",
        "type": "boolean"
      },
      {
        "title": "monday Doc",
        "type": "doc"
      },
      {
        "title": "Priority 1",
        "type": "color"
      },
      {
        "title": "Timeline",
        "type": "timerange"
      },
      {
        "title": "Label",
        "type": "color"
      }
    ]
  }
]

},
“account_id”: 6633143
}

Can you please check and confirm me with the same why I am not able to fetch the values from latest version.
Please let know what changes I need to make

hi @Shreyas13398

The output you are showing here is from an API 2023-07 call. You can see that e.g. because the type for a status column is returned as “color”. In 2023-10 this would be "status.

See example 2023-07

{
  "data": {
    "boards": [
      {
        "columns": [
          {
            "title": "Name",
            "type": "name"
          },
          {
            "title": "Subitems",
            "type": "subtasks"
          },
          {
            "title": "Person",
            "type": "multiple-person"
          },
          {
            "title": "Status",
            "type": "color"
          },
          {
            "title": "Date",
            "type": "date"
          },
          {
            "title": "Button",
            "type": "button"
          },
          {
            "title": "Timeline",
            "type": "timerange"
          },
          {
            "title": "Time Tracking",
            "type": "duration"
          }
        ]
      }
    ]
  },
  "account_id": 761505
}

and same board queried with 2023-10

{
  "data": {
    "boards": [
      {
        "columns": [
          {
            "title": "Name",
            "type": "name"
          },
          {
            "title": "Subitems",
            "type": "subtasks"
          },
          {
            "title": "Person",
            "type": "people"
          },
          {
            "title": "Status",
            "type": "status"
          },
          {
            "title": "Date",
            "type": "date"
          },
          {
            "title": "Button",
            "type": "button"
          },
          {
            "title": "Timeline",
            "type": "timeline"
          },
          {
            "title": "Time Tracking",
            "type": "time_tracking"
          }
        ]
      }
    ]
  },
  "account_id": 761505
}```
1 Like

Thanks @basdebruin it worked

Thank you @basdebruin !!!