-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to exclude .d.ts files from documents #1129
Comments
Im experiencing the same issue, but I'm trying to exclude a local schema definition thats in a The reason I tried excluding the local schema is because it overrides a field with another type, which causes the error Using graphql-codegen with a separate But I could not get my vscode graphql extension to work again, because I can not exclude the local schema file, which I don't need for intellisense in my IDE. |
Issue workflow progress
Progress of the issue based on the Contributor Workflow
Describe the bug
I am attempting to write a graphql config that will auto-generate typescript code based on embedded gql templates in .ts files.
I have found a bug that is caused by
.d.ts
(typescript type definitions files) also being included in the documents glob.To Reproduce
Steps to reproduce the behavior:
Use a configuration that includes .ts files. In this example, a .d.ts file may exist in
src/global.d.ts
.This config errors with:
Things I have tried:
"!(**/*.d.ts)"
src/**/!(.d)*.ts
exclude: "**/*.d.ts"
exclude: 'src/global.d.ts'
All of these have had no effect and .d.ts files are always included. I can only fix it by removing the
src/**/*.ts
entry.Expected behavior
.d.ts
files should be excluded and everything should work like magic.Environment:
@graphql-codegen/cli@2.11.8
)Additional context
The text was updated successfully, but these errors were encountered: