How handling special characters in mutation query?

I want to create item which have text column with special characters.

[attach my query]

mutation {
    create_item (board_id:$board_id, group_id: $group_id, item_name: $item_name, column_values: "{\",\"___9\":\"<hello><World!>\"}}") {
       id
   }
}

The query works fine, but it doesn’t print out the value I want on the screen.
It shows like this.(There’s no value in column.)

These symptoms do not occur only in <>. These symptoms also occur in other special characters.
How can i handling special characters?

Hello there @thlee,

It looks like there is a syntax error there. I am not sure what the comma is in that mutation you sent. I guess ___9 is the ID of the column.

In any case, I just created a working mutation you can use as an example:

mutation {
  create_item(board_id: 1234567890, group_id: "topics", item_name: "My name", column_values: "{\"text\":\"<hello><World!>\"}") {
    id
  }
}

In this case “text” would be the ID of the column.

Let me know if you have any other questions :slightly_smiling_face:

Cheers,
Matias

Thank you for your apply.
___9 is the Column which type is long text.

Attach my mutation query.(I used Postman to try mutation.)

mutation {
    create_item (board_id: 1234567890, group_id: "topics", item_name: "Hello World!", column_values: """{"___9": "<Samsung>"}""") {
       id
   }
}

Expected : Create item with ___9 column containing value.
Result : Create item with ___9 column containing Nothing.

Hello again,

That is not the correct syntax for quotes and escaping outer quotes.

This is a working Postman example:

mutation {
            create_item (board_id: 1234567890, group_id: "topics", item_name: "Hello World!", column_values: "{\"text\": \"<Samsung>\"}") {
       id
   }
}

You can find many Postman examples we created here.

Let me know if you have any other questions!

Cheers,
Matias

As far as I know, ’ “”" '(Tripple Quotation Mark) is GraphQL syntax which handling Special characters(ex: !, ?).

I tried your apply but it doesn’t work. It works same as i question.

Hello again,

I am not sure where you are testing the example I sent but it looks like you might have a typo somewhere because as you can see in this Postman screenshot, it works:

In our API, there is no need for triple quotes. As you can see in my example, I am not using them and special characters are being sent without any issues. At least not when using Postman or our API Playground directly. If you use some language that requires some other syntax in your script, that should be checked with the documentation for that language.

Let me know if you have any other questions!

Cheers,
Matias

This Issue has occurred in column which type is long-text.

Is there use different text converting logic?

Please check it.

Hello again @thlee,

The long text column has a sanitization mechanism that will not allow you to use that syntax.

As of today, there is no way of working around this for this column type.

Let me know if you have any other questions!

Cheers,
Matias

I wonder if you have any plans to fix this issue.

Hello again @thlee,

This is not a bug but rather a decision on how to handle sanitization for this column type.

This is not likely to change in the near future.

Having said that, I will share your feedback as a request for our team to take another look to see if it can be changed in the future.

Cheers,
Matias

1 Like