Monday api create item with rating and persons populated

Hi,

I am trying to create a new item in board with rating, person, and progress column values populated. But the item is created with blank column values. Below is the code I am using. As I am new to GraphQL queries any help will be appreciated.

let query5 = ‘mutation ($myItemName: String!, $columnVals: JSON!) { create_item (board_id:374759005, item_name:$myItemName, column_values:$columnVals) { id } }’;
let vars = {
“myItemName” : name,
“columnVals” : JSON.stringify({
“rating” : {“text”:priority},
“numbers” : 2,
“text9”:name,
“progress”:sourcing_progress,
“files”:project_images,
“person”:{name:worker_names}
})
};

fetch (“https://api.monday.com/v2”, {
method: ‘post’,
headers: {
‘Content-Type’: ‘application/json’,
‘Authorization’ : ’ ’
},
body: JSON.stringify({
‘query’ : query5,
‘variables’ : JSON.stringify(vars)
})
})
.then(res => res.json())
.then(res => console.log(JSON.stringify(res, null, 2)));

Hey @kdkasturiidey, I would recommend posting this in the developers section of the community so that you can get technical assistance! monday Apps & Developers - monday Community Forum