Move_item_to_board mutation

Can we get an example on how to use the move_item_to_board mutation especially when it comes to including column and subitem column mappings.

When column mapping argument is not included it works, but when included I get this error: ‘{“error_code”:“GraphqlGeneralError”,“status_code”:200,“error_message”:“Columns mapping is not in the expected format”,“error_data”:{}}’ and I did include ‘API-Version: 2023-10’ in the header.

Thanks

Hi Wandile,
I don’t have any answers, I’m here to wait with you.
I am running a mutation as per below,

mutation {
  move_item_to_board (board_id:5339528423, group_id: "topics", item_id:5528230293 , columns_mapping: [
  {source:"name", target: "name"},
  {source:"board_relation", target: "connect_boards2"},
  {source:"link", target:null},
  {source:"link_to_accounts2", target:null},
  {source:"mirror", target:null},
  {source:"status2", target:null},
  {source:"status", target:null},
  {source:"text", target:null},
  {source:"text8", target:null},
  {source:"mirror6", target:null},
  {source:"date1", target:null},
  {source:"date3", target:null},
  {source:"date15", target:null},
  {source:"date_1", target:null},
  {source:"date", target:null},
  {source:"status9", target:null},
  {source:"formula", target:null}]) {
    id
  }
}

and i’m getting

{
  "error_code": "GraphqlGeneralError",
  "status_code": 200,
  "error_message": "Columns mapping is not in the expected format",
  "error_data": {}
}

But to me I feel like I have followed the api docs to the letter.

Please note that you must specify the mapping for every column when using this argument. You can specify the target as null if you don’t want to map a column, but doing so means that the column’s data will be lost.

is it - null or “null” ?

Do I need to include {source: “subitems”, target: null } ?

Also, is it really necessary to force mapping every column? will my mutation be void if another user adds an additional column to the board?

1 Like