Skip to content

Commit 0b025e3

Browse files
mhusseiniMunir Husseini
andauthored
fix: allow client query folders to contain nested directories. (#573)
Co-authored-by: Munir Husseini <[email protected]>
1 parent 8bf956d commit 0b025e3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export const mapDocsToClients = (documents: string[], clients: string[]) => {
77

88
const docsWithClient = (client: string) => documents.filter(d => !mappedDocs.has(d)).filter((file: string) => {
99
const clientInExt = new RegExp(`\\.${client}\\.(gql|graphql)$`)
10-
const clientInPath = new RegExp(`\\/${client}\\/(?=${file.split('/').pop()?.replace(/\./g, '\\.')})`)
10+
const clientInPath = new RegExp(`\\/${client}\\/(.+\\/)?(?=${file.split('/').pop()?.replace(/\./g, '\\.')})`)
1111

1212
const clientSpecified = clientInExt.test(file) || clientInPath.test(file)
1313

0 commit comments

Comments
 (0)