Skip to content

Commit

Permalink
Remove $ from invalidPathRegex (#2090)
Browse files Browse the repository at this point in the history
* Remove $ from invalidPathRegex

Problem: `@graphql-codegen` silently ignore paths with `$`.
Solution: remove `$` from `invalidPathRegex`

* changeset

Co-authored-by: Arda TANRIKULU <ardatanrikulu@gmail.com>
  • Loading branch information
dizel3d and ardatan committed Oct 27, 2020
1 parent d36ee21 commit 8133a90
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/odd-moons-hunt.md
@@ -0,0 +1,5 @@
---
'@graphql-tools/utils': patch
---

fix(utils): Remove \$ from invalidPathRegex
2 changes: 1 addition & 1 deletion packages/utils/src/helpers.ts
Expand Up @@ -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);
}
Expand Down

0 comments on commit 8133a90

Please sign in to comment.