0
Why this json is valid:
    {
   "query":"mutation{ createCard(input: {pipe_id: 426174 fields_attributes: [{field_id: \"o_que\", field_value: \"Igor\"}{field_id: \"idade\", field_value: \"21\"}{field_id: \"cidade\", field_value: \"Vila Velha - ES\"}] parent_ids: [\"2735966\"] }) { card {id title }}}"
}
And this is invalid in the tests I do:
{"query":"mutation {
        createTableRecord(input: {
            table_id: \"RL-p4Ud_\"
            title: \"Igor Oliveira\"
            due_date: \"2018-04-10T11:04:57-03:00\"
            fields_attributes: [{
                field_id: \"nome_completo\",
                field_value: \"Igor Oliveira\"
            }, {
                field_id: \"e_mail\",
                field_value: \"[email protected]\"
            }, {
                field_id: \"telefone\",
                field_value: \"279800002\"
            }]
        }) {
            table_record {
                id title
            }
        }"}
the error is as follows:
Invalid characters found. [Code 18, Structure 4]
The idea is for the query to have all Mutation as a single string.
In PHP I am creating like this:
        $query = '{"query":"';
    $query .= 'mutation {
        createTableRecord(input: {
            table_id: \"RL-p4Ud_\"
            title: \"'.$nomecompleto.'\"
            due_date: \"'.date('c').'\"
            fields_attributes: [{
                field_id: \"nome_completo\",
                field_value: \"'.$nomecompleto.'\"
            }, {
                field_id: \"e_mail\",
                field_value: \"'.$email.'\"
            }, {
                field_id: \"telefone\",
                field_value: \"'.$telefone.'\"
            }]
        }) {
            table_record {
                id title
            }
        }';
      $query .= '"}';
						
It is not possible to break a string of a json value into multiple lines. So the second example of json is invalid even.
– Isac