Skip to main content

Hey everyone! I’m trying to get all the late cards from a specific pipe. At the moment, i’m using this code here, that gives me all the cards from the pipe and then, on my editor, i filter the late ones:

{allCards(pipeId: XXXXXXXX, first: 50) 
  {pageInfo {
    hasNextPage
    endCursor
  }
    edges {
      node {
        id
        late
        current_phase{
          id}
      }
    }
  }
}

 

Is there a way that i can get only the late cards? Like a request that only returns the late cards, an their respectives id and current phase?

Hey everyone! I’m trying to get all the late cards from a specific pipe. At the moment, i’m using this code here, that gives me all the cards from the pipe and then, on my editor, i filter the late ones:

{allCards(pipeId: XXXXXXXX, first: 50) 
  {pageInfo {
    hasNextPage
    endCursor
  }
    edges {
      node {
        id
        late
        current_phase{
          id}
      }
    }
  }
}

 

Is there a way that i can get only the late cards? Like a request that only returns the late cards, an their respectives id and current phase?



Hello, @contato1705 

The following code fetches the specified phase and returns only late cards

Check if its helps

 

{

    phase(id: "xxxxxxxxxx") {
    name
    cards {
        edges {
          node {
            id
            title
            late
           
            }
          
            }
          }
        }
      }
    


The answer by @marcosmelo does not do what you want, @contato1705 . It only lists the cards of a specific phase, without limit on whether they are late or not.

What should be possible instead is to use the https://api-docs.pipefy.com/reference/queries/#allCards allCards query with the filter, where you filter for the date.

I currently do not have the necessary tools available, but I will add another answer later with the actual query I would suggest.


Thanks for contributing, @genietim !


As promised, here an example query using the advanced search to query to the due date:

 

query {
allCards(pipeId: <yourPipeId>, filter: {
field: "due_date",
operator: lte,
value: "2023-03-14T00:00:00-02:00"
}) {
edges {
node {
id title late
fields {
name
value
}
}
}
}
}

 

that should solve your problem, no?


(thank you too, @marcosmelo , sorry if my answer was a bit too dismissive as I realise now, and sorry if I understood something wrong anyway)


Don't worry, @genietim

Tks!!


Reply