Get all Related objects record for users

Hi,
I want to get all related records of users for this I am using this query

   const queryBuilder = Backendless.DataQueryBuilder.create()
      queryBuilder.setWhereClause(`objectId != '${myObjectId}'`);
      queryBuilder.setRelated(['charities','user_gender']);
      let allUserInfo =  await Backendless.Data.of("Users").find(queryBuilder)

in this query I only get 10 records of related object But I need all records on multiple users in a single query.

Any Update.

Hello @Ayaz_Khan

Sorry for the delayed response.

The server is able to return you up to 100 relations in a single API call, in order to specify the maximum 100 records you can use the following option setRelationsPageSize(relationsPageSize:number)

const queryBuilder = Backendless.DataQueryBuilder.create()
      queryBuilder.setWhereClause(`objectId != '${myObjectId}'`);
      queryBuilder.setRelated(['charities','user_gender']);
      queryBuilder.setRelationsPageSize(100);
      let allUserInfo =  await Backendless.Data.of("Users").find(queryBuilder)

however, I assume your users might have more than 100 relations so you need to load all the items for every single user, you can use Business Logic to make only one request from the client

https://backendless.com/docs/js/data_relations_retrieve_overview.html

Regards, Vlad