Skip to main content
Solved

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

  • September 3, 2020
  • 1 reply
  • 168 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 ;)

View original
Did this topic help you find an answer to your question?

1 reply

Marcos Carvalho
Pipefy Staff
Forum|alt.badge.img+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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings