I'm using the Monday.com API in a React bootstrapped app.
I can create a new board item successfully with an item name...
monday.api(
`mutation {
create_item (
board_id: ${myBoardId},
group_id: "new_group",
item_name: "new item creation",
)
{
id
}
}`
)
...but when I try to add additional column values I get a POST 500 error.
monday.api(
`mutation {
create_item (
board_id: ${myBoardId},
group_id: "new_group",
item_name: "new item creation",
column_values: {
person: 00000000,
}
)
{
id
}
}`
)
I've tried passing a string in for the column values...
let columnValues = JSON.stringify({
person: 00000000,
text0: "Requestor name",
text9: "Notes",
dropdown: [0],
})
monday.api(
`mutation {
create_item (
board_id:${myBoardId},
group_id: "new_group",
item_name: "test item",
column_values: ${columnValues}
)
{
id
}
}`
).then(res => {
if(res.data){
console.log('new item info: ', res.data)
};
});
...but no item is created, I get no errors and nothing logs.