diff --git a/.changeset/small-days-double.md b/.changeset/small-days-double.md new file mode 100644 index 0000000000..95a9a8327c --- /dev/null +++ b/.changeset/small-days-double.md @@ -0,0 +1,5 @@ +--- +'@frontside/backstage-plugin-graphql-backend-module-catalog': patch +--- + +Fix text search property name for a cursor diff --git a/plugins/graphql-backend-module-catalog/src/resolvers.ts b/plugins/graphql-backend-module-catalog/src/resolvers.ts index 323fdd36ba..969b807617 100644 --- a/plugins/graphql-backend-module-catalog/src/resolvers.ts +++ b/plugins/graphql-backend-module-catalog/src/resolvers.ts @@ -26,7 +26,7 @@ interface CatalogCursor { totalItems?: number; isPrevious: boolean; orderFields?: Array<{ field: string; order: 'asc' | 'desc' }>; - fullTextSearch?: { term: string; fields?: string[] }; + fullTextFilter?: { term: string; fields?: string[] }; filter?: { anyOf: Array<{ allOf: { key: string; values: string[] }[] }> }; } @@ -425,8 +425,7 @@ export const queryResolvers: () => Resolvers = () => { } return [{ field: 'metadata.uid', order: 'asc' }]; })(); - - const fullTextSearch = (() => { + const fullTextFilter = (() => { if (rawFilter?.fullTextFilter) { return { term: rawFilter.fullTextFilter.term, @@ -466,7 +465,7 @@ export const queryResolvers: () => Resolvers = () => { Object.assign(cursorObject, { orderFields, - fullTextSearch, + fullTextFilter, filter: queryFilter, }); }