Skip to main content

GetEntityFacetsRequest.filter

Home > @backstage/catalog-client > GetEntityFacetsRequest > filter

If given, return only entities that match the given patterns.

Signature:

filter?: EntityFilterQuery;

Remarks

If multiple filter sets are given as an array, then there is effectively an OR between each filter set.

Within one filter set, there is effectively an AND between the various keys.

Within one key, if there are more than one value, then there is effectively an OR between them.

Example: For an input of

[
{ kind: ['API', 'Component'] },
{ 'metadata.name': 'a', 'metadata.namespace': 'b' }
]

This effectively means

(kind = EITHER 'API' OR 'Component')
OR
(metadata.name = 'a' AND metadata.namespace = 'b' )

Each key is a dot separated path in each object.

As a value you can also pass in the symbol CATALOG_FILTER_EXISTS (exported from this package), which means that you assert on the existence of that key, no matter what its value is.