Search.../

queryGroups( )

Creates a query to retrieve a list of groups.

Description

Note: For SECRET groups, only site admins, group admins, and group members can query groups and their content.

The queryGroups() function builds a query to retrieve a list of all groups, and returns a GroupsQueryBuilder object.

PROPERTYSUPPORTED FILTERS & SORTING
titleeq(),ne(),exists(),in(),hasSome(),startsWith(),ascending(),descending()
membersCountascending(),descending()
createdDateascending(),descending()
recentActivityDateascending(),descending()
Admin Method

This function requires elevated permissions to run. This function is not universal and runs only on the backend.

Syntax

function queryGroups(): GroupsQueryBuilder

queryGroups Parameters

This function does not take any parameters.

Returns

Return Type:

Was this helpful?

queryGroups example

Copy Code
1import { groups } from 'wix-groups.v2';
2
3 async function queryGroups() {
4 const { items } = groups.queryGroups().find();
5 }
6