Search.../

query

Returns the MembershipsQueryBuilder object used to get the current results.

Description

Use the query property to create and run a new query by chaining additional MembershipsQueryBuilder functions to it.

Was this helpful?

Get the query that produced the current result

Copy Code
1let resultQuery = results.query;
Perform a query and get the query that produced the result

Copy Code
1import { members } from "wix-groups-backend";
2
3// Sample memberId value:
4// '9t678vzc-b93cd-457f-b4a7-6178327834p88'
5//
6// Sample options value:
7// suppressAuth: true
8
9
10// ...
11
12const originalQueryResults = await members.queryMemberships()
13 .find({groupId: groupId, options})
14
15const newQueryResults = await originalQueryResults.query
16 .eq("role", "MEMBER")
17 .find({memberId: memberId, options});
18
19const firstItem = newQueryResults.items[0];