Hello @Inmo Tecnologia,
It is currently not possible to filter the phase in Pipefy queries.
A workaround is for you to create a field that will be updated with the phase name at each phase change.
So, you can add the filter to the content of this field with the name of the phase you want to filter.
A second, slightly more complex option is to use the Phases endpoint.
In this query, you inform the phase ID and get all the cards in the queried phase as a return.
You would have to do a treatment to be able to cross the two queries and filter only the cards that are in the two queries (Left Join).
The phase query can be done like this:
{
phase(id: 12345){
id
name
cards_count
fields {
id
label
}
cards{
edges{
node{
id
}
}
}
}
}
I agree with Lucas, either you introduce an auxilary field you search for, or you do the filtering manually in your code, either for the correct phase or the correct field value, whatever requires less cards to load.