Search.../

Introduction

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

Typically, you build a query using the resource catalog query function, refine the query by chaining ResourceCatalogQueryBuilder functions, and then execute the query by chaining the find() function.

For example, the following code queries extended resource information where the slug name is "john-doe", and logs the first 5 results to the console:

import { resources } from 'wix-bookings-backend';
resources.resourceCatalogQueryBuilder.queryResourceCatalog()
.eq("slugs.name", "john-doe")
.limit(5)
.find()
.then( (results) => {
console.log(results.items);
});
javascript | Copy Code

Was this helpful?