@@ -5,6 +5,6 @@
|
||||
|
||||
Added predicate-based entity filtering via POST /entities/by-query endpoint.
|
||||
|
||||
Supports `$all`, `$any`, `$not`, `$exists`, and `$in` operators for expressive entity queries. Integrated into the existing `queryEntities` flow with full cursor-based pagination, permission enforcement, and `totalItems` support.
|
||||
Supports `$all`, `$any`, `$not`, `$exists`, `$in`, and `$hasPrefix` operators for expressive entity queries. Integrated into the existing `queryEntities` flow with full cursor-based pagination, permission enforcement, and `totalItems` support.
|
||||
|
||||
The catalog client's `queryEntities()` method automatically routes to the POST endpoint when a `query` predicate is provided.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2024 The Backstage Authors
|
||||
* Copyright 2026 The Backstage Authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -83,7 +83,7 @@ export function applyPredicateEntityFilterToQuery(options: {
|
||||
const { filter, targetQuery, onEntityIdField, knex } = options;
|
||||
|
||||
// We do not support top-level primitives; all matching happens through objects
|
||||
if (!filter || typeof filter !== 'object' || Array.isArray(filter)) {
|
||||
if (!isObject(filter)) {
|
||||
throw new InputError(
|
||||
`Invalid filter predicate: top-level primitive values are not supported. ` +
|
||||
`Wrap the value in a field expression, e.g. { "kind": ${JSON.stringify(
|
||||
|
||||
Reference in New Issue
Block a user