The JoinRequestQueryBuilder
functions enable you to run, sort, filter, and control
which results a query returns.
Typically, you build a query using the queryJoinRequests()
function,
refine the query by chaining JoinRequestsQueryBuilder
functions, and then execute the
query by chaining the find()
function.
For example, the following code returns the first 5 requests to join a group that have been approved, and sorts them by created date in descending order.