small fixes

Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
Fredrik Adelöw
2026-02-20 11:47:51 +01:00
parent 59d4582020
commit 42d89b5025
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -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(