Skip to main content

How to fix Parse Error?

  • March 30, 2023
  • 3 replies
  • 1230 views

  • Participating Frequently

I have wonder why this query has occurred Parse Error?

And i wonder what should I do to operate as create Item?

[ My GraphQL Query ]

mutation {
    create_item (board_id: ${boardId}, group_id: ${groupId}, item_name: ${itemName}, column_values: "{\\"___5\\":\\"\\uC708(\\uC8FC)\\"}"
    )
    { id
        board {
            id
            name
        }              
        group {
            id
            title
        }
    }
}

[ Error Code ]

{
    "errors": [
        {
            "message": "Parse error on \\"(\\" (LPAREN) at [2, 149]",
            "locations": [
                {
                    "line": 2,
                    "column": 149
                }
            ]
        }
    ],
    "account_id": 8736257
}

3 replies

  • April 3, 2023

Hi @thlee,

I see an extra \\ in this part of your value: (\\uC8FC)
Was this intentional?

I believe this is causing a parsing error when escaping the quotes.


  • Author
  • Participating Frequently
  • April 4, 2023

I using Apache Common Text Library for handling escaping letters in java.
That is the result of StringEscapeUtils.escapeJava() which is unicode.
If get rid of "" then items that are registered have the following values.

(uC8FC)

I want to create an item with a value of “윈(주)” but it’s registered as above.
I used “(주)” to substitute other values, but I confirmed that the item is registered normally with that content.
[ Working Example ]

example : (\\uC8FC)\\uB9CC

[ Non-Working Example

example : \\uB9CC(\\uB9CC)

This seems to happen when ‘(\\uB9CC)’ comes after the word.

Please answer how to resolve this problem?


Matias.Monday
Forum|alt.badge.img
  • monday.com Team Member
  • April 4, 2023

Hello there @thlee,

I believe you can make this work by passing the column values as a variable:

mutation ($columnValues: JSON!) {
    create_item (board_id: 1234567890, group_id: "topics", item_name: "My item", column_values: $columnValues
    )
    { id
        board {
            id
            name
        }              
        group {
            id
            title
        }
    }
}

Variables:
{"columnValues":"{\\"text\\":\\"\\uC708(\\uC8FC)\\"}"}

Please let me know how that goes!

Cheers,
Matias