Returns the resource catalog items that match the query.
The find()
function returns a Promise that resolves to the results found
by the query and some information about the results. The Promise is
rejected if find()
is called with incorrect permissions or if any of the
functions used to refine the query are invalid.
Use the options
parameter to run find()
without checking for permissions.
Options to use when performing a query.
Refines a query to match items whose specified property contains any of the specified value
parameters.
The hasSome()
function refines a ResourceCatalogQueryBuilder
to only match items where the value of the specified property equals any of the specified values in the array.
Matching strings with hasSome()
is case sensitive, so "text"
is not equal to "Text"
.
You can specify a list of values to match by providing comma-separated String types as the value
parameters. You can also specify a list of these values by including them in an array and providing the array as the value
.
The property whose values will be compared with value
.
Supported properties:
_id
slugs.name
The values to match against.
Limits the number of items the query returns.
The limit()
function defines the number of results a query returns in each
page. Only one page of results is retrieved at a time. The next()
and prev()
functions are used to
navigate the pages of a query result.
By default, limit
is set to 50
.
The maximum value that limit()
can accept is 1000
.
function limit(limit: number): ResourceCatalogQueryBuilder;
The number of items to return, which is also the pageSize
of the results object.
let query = resources.queryResourceCatalog().limit(10);