Search code examples
wakanda

why wakanda client send only 40 as response


Is their any way of increasing the wakanda client pageSize before performing the query to make itreturn us more than 40 value from the datastore.

I tried some query and getting the response to be 40 everytime not more than that.

The attribute of the returned object has a _count of 38654 value in it but i am getting only 40 of them.


Solution

  • You can set the pageSize of the query passing it as an option (query option definition). This options are equivalent to the old Datastore options (datastore query options).

    Example:

    ds.Company.query({
      start: 0,
      pageSize: 200
    })
    

    This will return the first 200 results of the query (query method definition). Please consult the collection documentation page to find further helpers (nextPage and more for instance) to explore the query results quickly.