Monday api create item with rating and persons populated


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,

fetch (“”, {
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!