On my monday board there are more than 600 main item and more than 8000 sub item. I am unable to fetch the data in a one go. How can I fetch the data without any limitations and restrictions

{ boards(ids:3881776640) { name items(newest_first:true,limit:3000) { id name parent_item { id name } column_values { title text } } } };

Hello there @Shreyas13398 and welcome to the community!

I hope you like it here :muscle:

Because of our timeout policy (check it out here), if your query or mutation can not be executed in 60 seconds, it will time out. In this case, you are tryin to get a big amount of data all together and you are probably not being able to do so in 60 seconds. If that is the case, and you see a timeout error, then you can use pagination to avoid timeouts.

You can check all about it in this article.

Basically, you would be dividing the data into smaller chunks and iterating through the different pages.

As an example, if you had 1000 items in a board, you could use one query to get all the information:

query {
        items (limit: 1000) {
            id
            column_values {
               value
               text
        }
    }   
}

But that could lead to a timeout error if the amount of data is too big.

Using pagination, you could iterate through smaller pages until you get all the data:

query {
        items (limit: 100, page:1) {
            id
            column_values {
               value
               text
        }
    }   
}

This would give you the first 100 items in the board and their data.

Then you would go for the second page:

query {
        items (limit: 100, page:2) {
            id
            column_values {
               value
               text
        }
    }   
}

This would give you the items 101 until 200.

You would then go to the 3rd page and so on until you get all the information. You stop the iteration when the number of retrieved items is smaller than the set limit, or when the response is empty, whatever you want to choose.

Let me know if you have any other questions :slightly_smiling_face:

Cheers,
Matias

Thanks @Matias.Monday , it worked!

1 Like

Glad to hear that @Shreyas13398!

Let us know if you need anything else :slightly_smiling_face: