Skip to main content

While running this don’t get any errors, just empty request


    value_json<-toJSON("{'index':3}")

request_form<-paste(
'mutation {change_column_value (
board_id: 347384734,
item_id: 34239483,
column_id: "status",
value:',value_json,' ) {
id
}

}',sep = '')

Wrote random ids


Here’s function to process my request, maybe something wrong with it.


 GQL <- function(query,
...,
.token = NULL,
.variables = NULL,
.operationName = NULL,
.url = url){
pbody <- list(query = query, variables = .variables, operationName = .operationName)
if(is.null(.token)){
res <- POST(.url, body = pbody, encode="json", ...)
} else {
auth_header <- paste(.token)
res <- POST(.url, body = pbody, encode="json", add_headers(Authorization=auth_header), ...)
}
res <- content(res, as = "parsed", encoding = "UTF-8")
if(!is.null(res$errors)){
warning(toJSON(res$errors))
}
res$data
}

But it worked while quering and creating notifications

Hey @Valeriia - welcome!


Let me check in with the team on this one - I’ll post again as soon as I have more information on this.


-Daniel


Hi @Valeriia !


I’m not too familiar with the language that you’re using. I may be too late and way off, but I thought I’d throw it in here anyway just in case it’s helpful.


I wonder if this is the same problem that @supernova faced in Can't change column value(s)


I see


    value_json<-toJSON("{'index':3}")

request_form<-paste(
'mutation {change_column_value (
board_id: 347384734,
item_id: 34239483,
column_id: "status",
value:',value_json,' ) {
id
}

}',sep = '')

And that made me wonder if you’re plugging your value straight into the query. In the above post mentioned, we discovered that there’s a problem with that query and variables is required for change_column_value.


Hope that helps


I can attest to this. Good catch 🌶


Hi @Valeriia, you might wanna try using variables as suggested by @pepperaddict. I found that setting the value directly in query didn’t work for me & that was what caused the problem for my case.


Also as an FYI, a query that runs successfully in the GraphQL editor isn’t always a good indicator that the same formatted query will perform as well in code. Hopefully by now you’ve gotten past this issue though as I see it’s been a week since you posted…if not, then I really hope you get this resolved ASAP.


Rooting for your speedy success 🙂