Solved

How may i do two mutations on cards, using just one "play"?

  • 3 September 2020
  • 1 reply
  • 115 views

Userlevel 5


If i run code below, just the card 999 is updated. How may i update two or more cards.

mutation {
updateCardField(
input: {card_id: 888, field_id: ""user_id_ad"", new_value: ""2""},
input: {card_id: 999, field_id: ""user_id_ad"", new_value: ""2""})
{card {id}}
}

icon

Best answer by Marcos Carvalho 10 September 2020, 17:15

View original

1 reply

Userlevel 6
Badge +6

Hey Amanda, how are you? 

 

To run multiple mutations you need to name each mutation like this: 

 

mutation {
m1:updateCardField(
input: {
card_id: 383932000
field_id: "test"
new_value: "this a new value"
}
) {
card {
id
}
}

m2:updateCardField(
input: {
card_id: 383932138
field_id: "teste"
new_value: "another value"
}
) {
card {
id
}
}
}

 

 

Hope it helps you ;)

Reply