Does allCards return more than 50 cards per query, or do we need to pass the ""first"" combined with ""after"" parameters?
Solved
Return to more than 50 cards
Best answer by Marcos Carvalho
Hey Nigel,
Pipefy GraphQL API has a maximum limit of 50 objects for each request, but you can request less objects using the filter first. allCards query has this limitation and it’s necessary to pass the parameters for Pagination.
Here a pagination example:
In each request you can query the pageInfo to bring the cursor for the next (or previous) list of 50 objects.
{
allCards(pipeId: 1264926,first:5) {
edges {
node {
id
}
}
pageInfo {
endCursor
startCursor
}
}
}
Here an example payload for the request:
{
"data": {
"allCards": {
"edges": [
{
"node": {
"id": "368825599"
}
},
{
"node": {
"id": "369521028"
}
},
{
"node": {
"id": "373362189"
}
},
{
"node": {
"id": "373362192"
}
},
{
"node": {
"id": "375141382"
}
}
],
"pageInfo": {
"endCursor": "WyIxLjAiLCIyOC4wIiwzNzUxNDEzODJd",
"startCursor": "WyIxLjAiLCIzLjAiLDM2ODgyNTU5OV0"
}
}
}
}
Now you can use the startCursor for the next 5 objects:
{
allCards(pipeId: 1264926,first:5,after:"WyIxLjAiLCIzLjAiLDM2ODgyNTU5OV0") {
edges {
node {
id
}
}
pageInfo {
endCursor
startCursor
}
}
}
Hope it helps you.
Reply
Rich Text Editor, editor1
Editor toolbars
Press ALT 0 for help
Join us in the Pipefy Community! 🚀
No account yet? Create an account
Login with your Pipefy credentials
or
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.