Skip to content

Commit b0b3511

Browse files
authored
remove invalid character validation from searchMetadata query (#490)
* remove invalid character validation from searchMetadata query * remove unecessary queryTerm
1 parent 601972f commit b0b3511

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
77

88
## [Unreleased]
99

10+
### Removed
11+
12+
- Remove invalid character validation from `searchMetadata` query.
13+
1014
## [1.88.1] - 2025-10-29
1115

1216
### Added

node/resolvers/search/index.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { NotFoundError, UserInputError, createMessagesLoader } from '@vtex/api'
2-
import { pathOr, test } from 'ramda'
2+
import { pathOr } from 'ramda'
33

44
import {
55
buildAttributePath,
@@ -535,13 +535,6 @@ export const queries = {
535535
},
536536

537537
searchMetadata: async (_: any, args: SearchMetadataArgs, ctx: Context) => {
538-
const queryTerm = args.query
539-
if (queryTerm == null || test(/[?&[\]=]/, queryTerm)) {
540-
throw new UserInputError(
541-
`The query term contains invalid characters. query=${queryTerm}`
542-
)
543-
}
544-
545538
if (args.selectedFacets) {
546539
const { maps, queries } = args.selectedFacets.reduce(
547540
(acc, { key, value }) => {

0 commit comments

Comments
 (0)