C# Query Create_Item

I’ve been struggling with converting my GraphQL query into a C# query. All I get is a bad request or a parse error. This is what my query looks like atm.

var query = QueryMondayApi(@“{ ““query””: ““mutation { create_item(board_id: " + BoardId + @”, group_id: " + “new_group61452” + @”, item_name: "”" + item.ProductNumber +
@“"”, column_values: "“{ \"”" + ShipNameId + @“\"”: \"“” + item.ShipName + @“\"”, \"“”
+ CcId + @“\"”: \"“” + item.NoCc + @“\"”, \"“”
+ EuId + @“\"”: \"“” + eu + @“\"”, \"“”
+ OaId + @“\"”: \"“” + item.Oa + @“\"”, \"“”
+ GroupNoId + @“\"”: \"“” + item.GroupNo + @“\"”, \"“”
+ MustShipId + @“\"”: {\"“date\"” : \"“” + mustShip + @“\"”}, \"“”
+ PlannedDateId + @“\"”: {\"“date\"” : \"“” + plannedDate + @“\"”}}"“){ id}}”“}”).Result;

Thanks!

hey,

many people have been struggling with this and fortunately there is a solution.
here is a working solution

Glad we found a solution for this! Thanks Tanya :slight_smile:

This adds an item for me, but does not update the columns.

		var helper = new MondayHelper();
		string json = await helper.QueryMondayApiV2("{\"query\": \"{boards(limit:100){id name}}\"}");


		string query = @"{""query"": ""mutation {create_item(board_id: 628989982, item_name: \""adding works\"", column_values: \""{\\\""Manager comment\\\"": \\\""Done\\\""}\"") {id}  }"" }";
		var res = await helper.QueryMondayApiV2(query);