chore: 📝 add changeset for predicate-based entity querying

Signed-off-by: Nilay1999 <nilayparmar19@gmail.com>
This commit is contained in:
Nilay1999
2026-02-12 00:32:09 +05:30
committed by benjdlambert
parent 4bc4eb06a0
commit 51e23eb73e
2 changed files with 66 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
---
'@backstage/catalog-client': minor
'@backstage/plugin-catalog-backend': minor
---
New POST /entities/by-query endpoint
- Supports predicate-based entity filtering using advanced query operators ($all, $any, $in, $not, $exists)
- Enables complex nested queries for more powerful entity searches
- Provides cursor-based pagination for efficient result traversal
Updated Catalog Client
- Enhanced queryEntities() method to automatically route requests to POST endpoint when query predicate is provided
- Validates mutual exclusivity between filter (legacy) and query (predicate-based) parameters
+51
View File
@@ -231,6 +231,56 @@ export type EntityOrderQuery =
order: 'asc' | 'desc';
}>;
// @public
export type EntityPredicate =
| EntityPredicateAll
| EntityPredicateAny
| EntityPredicateNot
| boolean
| number
| string
| {
[key: string]: EntityPredicateValue;
};
// @public
export interface EntityPredicateAll {
// (undocumented)
$all: Array<EntityPredicate>;
}
// @public
export interface EntityPredicateAny {
// (undocumented)
$any: Array<EntityPredicate>;
}
// @public
export interface EntityPredicateExists {
// (undocumented)
$exists: boolean;
}
// @public
export interface EntityPredicateIn {
// (undocumented)
$in: Array<string | number | boolean>;
}
// @public
export interface EntityPredicateNot {
// (undocumented)
$not: EntityPredicate;
}
// @public
export type EntityPredicateValue =
| EntityPredicateExists
| EntityPredicateIn
| boolean
| number
| string;
// @public
export interface GetEntitiesByRefsRequest {
entityRefs: string[];
@@ -320,6 +370,7 @@ export type QueryEntitiesInitialRequest = {
limit?: number;
offset?: number;
filter?: EntityFilterQuery;
query?: EntityPredicate;
orderFields?: EntityOrderQuery;
fullTextFilter?: {
term: string;