Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Unable to parse test files with a glob expression #391

Closed
geotry opened this issue Jan 2, 2020 · 2 comments
Closed

Unable to parse test files with a glob expression #391

geotry opened this issue Jan 2, 2020 · 2 comments
Labels

Comments

@geotry
Copy link

geotry commented Jan 2, 2020

Since version 1.9.X of graphql-codegen I'm unable to parse my graphql documents located in my test files (ending by .spec.ts).

I found in the source code this line causing these files to be ignored:

if (!path.endsWith('.d.ts') && !path.endsWith('.spec.ts') && !path.endsWith('.spec.js') && !path.endsWith('.test.ts') && !path.endsWith('.test.js')) {

It works if I don't use a glob expression and directly point my file.
What is the reason behind this? Because it can easily done by the glob expression itself.

ardatan added a commit that referenced this issue Jan 3, 2020
@ardatan ardatan added enhancement New feature or request waiting for release labels Jan 3, 2020
@ardatan
Copy link
Owner

ardatan commented Jan 3, 2020

If you use yarn, you can try it by using resolutions field in package.json to test the fix with the following version?
0.8.2-alpha-d68e52d.1

@geotry
Copy link
Author

geotry commented Jan 3, 2020

I tested using version 0.8.2-alpha-d68e52d.1 of @graphql-toolkit/core in resolutions (wasn't sure which package you were mentionning), and it worked!
Thank you 👍

@ardatan ardatan closed this as completed in ac7fbea Jan 6, 2020
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants