> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt # Method name: queryJoinRequests() # Method package: wixGroupsBackend # Method menu location: wixGroupsBackend --> JoinRequests --> queryJoinRequests # Method Link: https://dev.wix.com/docs/velo/apis/wix-groups-backend/join-requests/query-join-requests.md # Method Description: Creates a query to retrieve a list of join requests. > **Notes:** > + This function is only relevant for private groups. > + For `SECRET` groups, only site admins and group admins can query requests to join their group. However, if the `suppressAuth` option is set to `true`, all permissions are overwritten, and all site members (including non-group members) can query requests to join a group. The `queryJoinRequests()` function builds a query to retrieve a list of all requests to join a group, and returns a [JoinRequestsQueryBuilder](https://dev.wix.com/docs/velo/apis/wix-groups-backend/join-requests/join-requests-query-builder/introduction.md) object. The returned object contains the query definition which is typically used to run the query using the [`find()`](https://dev.wix.com/docs/velo/apis/wix-groups-backend/join-requests/join-requests-query-builder/find.md) function. You can refine the query by chaining `JoinRequestsQueryBuilder` functions onto the query. `JoinRequestsQueryBuilder` functions enable you to sort, filter, and control the results that `queryJoinRequests()` returns. The results of the `queryJoinRequests()` function are sorted by `_createdDate` in descending order. `queryJoinRequests()` runs with this `JoinRequestsQueryBuilder` default, which you can override: + [`limit(100)`](https://dev.wix.com/docs/velo/apis/wix-groups-backend/join-requests/join-requests-query-builder/limit.md) The following `JoinRequestsQueryBuilder` functions are supported for `queryJoinRequests()`. For a full description of the JoinRequests object, see the object returned for the [`items`](https://dev.wix.com/docs/velo/apis/wix-groups-backend/join-requests/join-requests-query-result/items.md) property in [`JoinRequestsQueryResult`](https://dev.wix.com/docs/velo/apis/wix-groups-backend/join-requests/join-requests-query-result/introduction.md). | Property | Supported Filters & Sorting | | --------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `status` | [`eq()`](https://dev.wix.com/docs/velo/apis/wix-groups-backend/join-requests/join-requests-query-builder/eq.md), [`ne()`](https://dev.wix.com/docs/velo/apis/wix-groups-backend/join-requests/join-requests-query-builder/ne.md), [`hasSome()`](https://dev.wix.com/docs/velo/apis/wix-groups-backend/join-requests/join-requests-query-builder/has-some.md), [`or()`](https://dev.wix.com/docs/velo/apis/wix-groups-backend/join-requests/join-requests-query-builder/or.md) | # Method Code Examples: *** Note: do not assume any prop names or enum values other than the ones in the example. ## Query requests to join a group ```javascript import { Permissions, webMethod } from 'wix-web-module'; import { joinRequests } from 'wix-groups-backend'; export const myQueryJoinRequestsFunction = webMethod(Permissions.Anyone, () => { return joinRequests.queryJoinRequests() .find() .then((results) => { const items = results.items; const firstItem = items[0]; const pageSize = results.pageSize; const totalPages = results.totalPages; const totalCount = results.totalCount; const currentPage = results.currentPage(); const next = results.next(); const previous = results.prev(); const hasNext = results.hasNext(); const hasPrev = results.hasPrev(); const length = results.length; return items; }) .catch((error) => { console.error(error); }); }); /* Returns items: * [ * { * "memberId": "937cd3db-e9be-4980-93c1-a6d767a11050" * "_createdDate": "Wed May 14 2021 10:05:20 GMT+0300" * "status": "REJECTED" * "rejectionReason": "Wrong group." * }, * { * "memberId": "7fe8e9e1-d050-4c86-9684-e7f231600a34" * "_createdDate": "Sun July 11 2020 03:25:30 GMT+0300" * "status": "PENDING" * } * ] */ ``` ---