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.
PROPERTY | SUPPORTED FILTERS & SORTING |
---|---|
title | eq() ,ne() ,exists() ,in() ,hasSome() ,startsWith() ,ascending() ,descending() |
membersCount | ascending() ,descending() |
createdDate | ascending() ,descending() |
recentActivityDate | ascending() ,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';23 async function queryGroups() {4 const { items } = groups.queryGroups().find();5 }6