Search.../

items

Returns an array of createRequests items that match the query.

Description

items contains the current page of results retrieved by the query. If no results match the query, items is an empty array. The page size is defined by the limit() function and can be retrieved using the pageSize property. You can use the next() and prev() functions returned by createRequests to navigate the pages of a query result.

Type:

Array<
GroupRequest
>
NAME
TYPE
DESCRIPTION
_id
string

ID of the request to create a group. Same as group ID.

group
Group

Group requested to create.

requestDetails
RequestDetails

Details of request to create a group.

status
string

Status of the request to create a group. One of:

  • "PENDING" - Pending group request.
  • "APPROVED" - Approved group request.
  • "REJECTED" - Rejected group request.
  • "CANCELED" - Canceled group request.

Was this helpful?

Get items from a query result

Copy Code
1const returnedItems = results.items;
2
Perform a query and get items from the result

Copy Code
1import { createRequests } from 'wix-groups.v2';
2
3export async function myQueryFunction() {
4 const results = await createRequests.queryGroupRequests().find();
5
6 const returnedItems = results.items;
7
8 if (returnedItems.length > 0) {
9 return items;
10 } else {
11 // Handle if no matching items found
12 }
13}
14