Skip to main content
Solved

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

  • September 3, 2020
  • 1 reply
  • 201 views


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}}
}

Best answer by Marcos Carvalho

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 ;)

1 reply

Marcos Carvalho
Pipefy Staff
Forum|alt.badge.img+6
  • Pipefy Staff
  • Answer
  • September 10, 2020

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 ;)