Skip to main content
Solved

make inclusion of labels, without losing an existing label without card

  • September 6, 2022
  • 2 replies
  • 240 views

fabiorosa
When I say an update on the card just to update the Card, all Label markings are lost. Here's the GraphiQL I'm using:

 

mutation {
  updateCard(
    input: {
      id: 568589818, 
      title: "Update Card",
      label_ids: ["307521167"],       
    },
  ),
  {
    clientMutationId
    card {
      id
      title
    }
  }
}

 

But when I want to include a new label, the previous label is lost, follow the example
mutation {
  updateCard(
    input: {
      id: 568589818, 
      title: "Update Card",
      label_ids: ["307597207", "307597211"],       
    },
  ),
  {
    clientMutationId
    card {
      id
      title
    }
  }
}

 

Note that the label of the first code is not maintained, if I consult the labels of the card, only the last two will be returned ( label_ids: ["307597207", "307597211"] ) .

 

I would just like to add the two labels and keep the old label. So the CARD would have the three labels ( label_ids: ["568589818", "307597207", "307597211"] )

 

Is there any way to just append labels to the CARD?

 

 

Best answer by julia-pinheiro

Hi!

To add a label rather than replace it, you would have to update a blank label field.

And, If the label field is already filled, when you update it by API will also replace the information.

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

2 replies

genietim
Forum|alt.badge.img+12
  • Pipefy Legend
  • 412 replies
  • September 8, 2022

With the currently listed official API documentation, the answer seems to be no, you first have to query the current card's labels and use the query you listed with all the label ids.


julia-pinheiro
Pipefy Staff
Forum|alt.badge.img+1
  • Pipefy Staff
  • 39 replies
  • Answer
  • September 12, 2022

Hi!

To add a label rather than replace it, you would have to update a blank label field.

And, If the label field is already filled, when you update it by API will also replace the information.


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