query


queryEventsQueryBuilderRead-only

Contains functionality for refining a Wix events query.

The EventsQueryBuilder functions enable you to run, sort, filter, and control which results a query returns.

Typically, you build a query using any of the event query functions, refine the query by chaining EventsQueryBuilder functions, and then execute the query by chaining the find() function.

For example, the following code returns the first 5 upcoming Wix events created by a given event manager, including scheduled events and events that have started. The events are listed in ascending order by the event's start date.

import { wixEvents } from 'wix-events-backend'; wixEventsBackend.queryEvents() .eq("createdBy", "4c47c608-cfa8-4037-93ac-738f09560ed3") .hasSome("status", ["SCHEDULED", "STARTED"]) .ascending("scheduling.startDate") .limit(5) .find() .then( (results) => { console.log(results.items); } );
Was this helpful?
Yes
No