I managed to insert with this:
mutation{
createTableRecord(
input: {
table_id: "table id",
title: "Teste (colaboradores)",
fields_attributes: [
{field_id: "email_pessoal", field_value: "email@email.com.br"},
{field_id: "nome_completo", field_value: "nome completo"},
{field_id: "matr_cula", field_value: "12345"}]
}
)
{
table_record { id }
}
}
I just don't know how to add multiple records at once.
To insert more than one record at once, you can use multiple queries in the same request. An example would be:
mutation{
N0 createTableRecord(
input: {
table_id: "table id",
title: "Teste (colaboradores)",
fields_attributes: [
{field_id: "email_pessoal", field_value: "email@email.com.br"},
{field_id: "nome_completo", field_value: "nome completo"},
{field_id: "matr_cula", field_value: "12345"}]
}
)
{
table_record { id }
}
N1 createTableRecord(
input: {
table_id: "table id",
title: "Teste2 (colaboradores)",
fields_attributes: [
{field_id: "email_pessoal", field_value: "email2@email.com.br"},
{field_id: "nome_completo", field_value: "nome completo2"},
{field_id: "matr_cula", field_value: "6789"}]
}
)
{
table_record { id }
}
}
for two at once. The “N0” and “N1” can be any alphanumeric string (or not even there) and would allow you to associate the results with the queries/mutations.
Note that there is a certain limit to the nr of queries and/or mutations you can make at once, somewhere around 30 I belive.
Perfect, @rafael-pitanga
Do you need more help on that?