diff --git a/.changeset/odd-moons-hunt.md b/.changeset/odd-moons-hunt.md new file mode 100644 index 00000000000..7410543cca0 --- /dev/null +++ b/.changeset/odd-moons-hunt.md @@ -0,0 +1,5 @@ +--- +'@graphql-tools/utils': patch +--- + +fix(utils): Remove \$ from invalidPathRegex diff --git a/packages/utils/src/helpers.ts b/packages/utils/src/helpers.ts index bff8afe38ae..9bf75a42409 100644 --- a/packages/utils/src/helpers.ts +++ b/packages/utils/src/helpers.ts @@ -42,7 +42,7 @@ export function isDocumentString(str: string): boolean { return false; } -const invalidPathRegex = /[‘“!$%&^<=>`]/; +const invalidPathRegex = /[‘“!%&^<=>`]/; export function isValidPath(str: string): boolean { return typeof str === 'string' && !invalidPathRegex.test(str); }