I’ve been using the Monday API to automatically post updates to a board for several weeks now. One of the columns that I’m changing is a Date column. Starting yesterday, all of my requests to change columns of this type have returned 400 errors, with the message:
My query, obviously, does not have “=>” in it. My query looks like this:
mutation
{
change_column_value(
board_id: 12335234,
item_id: 2312342341231,
column_id: date,
value: "{\"date\":\"2019-11-1\", \"time\":\"12:39:00\"}"
) {
id
name
column_values {
id
text
value
}
}
}
which, according to your documentation, is correct. Any input as to what could be happening/ what I’m doing wrong? Thanks!
HI @jeffnb and @devendra! Thanks for posting about this - happy to help. I see that you are both formatting the value string like this below:
Could you try altering the value string to reflect this format for mutating the date column? You’d need to format this stringified JSON object with a date key (see below).
(node:26156) UnhandledPromiseRejectionWarning: Error: Parse error on “:” (STRING) at [2, 107]: {“response”:{“errors”:[{“message”:“Parse error on “:” (STRING) at [2, 107]”,“locations”:[{“line”:2,“column”:107}]}],“account_id”:5593070,“status”:200},“request”:{“query”:“mutation {\n change_column_value (board_id: 453149783, item_id: 453319956, column_id: “due_to”, value:”{“date”:“2020-01-09”}") {\n id\n
}\n }"}}
at GraphQLClient. (C:\Users\aviram\meetee0.3\node_modules\graphql-request\dist\src\index.js:116:35)
at step (C:\Users\aviram\meetee0.3\node_modules\graphql-request\dist\src\index.js:40:23)
at Object.next (C:\Users\aviram\meetee0.3\node_modules\graphql-request\dist\src\index.js:21:53)
at fulfilled (C:\Users\aviram\meetee0.3\node_modules\graphql-request\dist\src\index.js:12:58)
at process._tickCallback (internal/process/next_tick.js:68:7)
(node:26156) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:26156) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.