Skip to main content
Solved

Pipefy API GraphQL Page Handling

  • December 12, 2024
  • 2 replies
  • 69 views

mark-theotcentre
Forum|alt.badge.img

I’m trying to figure out whether it’s possible to formulate a GraphQL query to retrieve more than 50 items

Here’s a sample query which is returning a page of 50 items, when in fact I want all cards

 

query MyQuery {
  cards(pipe_id: "305537187") {
    nodes {
      id
      current_phase {
        name
      }
      fields {
        value
        native_value
        field {
          id
          label
          internal_id
          index_name
          index
        }
      }
    }
  }
}

Best answer by marcelo.shiba

For paginating, you shoud add in your query:

pageInfo {
  endCursor
  hasNextPage
}

and use the value of endCursor as after parameter in subsequent queries, while hasNextPage is true

Example:

query MyQuery {
  cards(pipe_id: "11111", after: "WyIyMDIzLTA1LTIzIDE3OjEwOjE0LjgyOTE2MzAwMCBVVEMiLCIyLjAiLDcxNTIxMTAzNl0") {
    nodes {
      id
      current_phase {
        name
      }
      fields {
        value
        native_value
        field {
          id
          label
          internal_id
          index_name
          index
        }
      }
    }
    pageInfo {
        hasNextPage
        endCursor
    }
  }
}

 

See more details at: https://graphql.org/learn/pagination/#pagination-and-edges

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

2 replies

diogo.pessoa
Pipefy Staff
  • Pipefy Staff
  • 17 replies
  • December 13, 2024

Hey Marck,

We have pagination  limit. The current limit of cards/records shown is 30 cards per phase and 50 cards per pipe. 

Regards


marcelo.shiba
Pipefy Staff
  • Pipefy Staff
  • 9 replies
  • Answer
  • December 13, 2024

For paginating, you shoud add in your query:

pageInfo {
  endCursor
  hasNextPage
}

and use the value of endCursor as after parameter in subsequent queries, while hasNextPage is true

Example:

query MyQuery {
  cards(pipe_id: "11111", after: "WyIyMDIzLTA1LTIzIDE3OjEwOjE0LjgyOTE2MzAwMCBVVEMiLCIyLjAiLDcxNTIxMTAzNl0") {
    nodes {
      id
      current_phase {
        name
      }
      fields {
        value
        native_value
        field {
          id
          label
          internal_id
          index_name
          index
        }
      }
    }
    pageInfo {
        hasNextPage
        endCursor
    }
  }
}

 

See more details at: https://graphql.org/learn/pagination/#pagination-and-edges


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

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