dotansimha / dotansimha/graphql-code-generator

Automatically exclude `node_modules/` from `documents`

Open
#8,434 0 comments 1 reaction 0 assignees View on GitHub
core
Dominant language
TypeScript
Stars
11.3k
Forks
1.4k
Avg merge
1d 1h
Merged PRs (30d)
23

Description

**Is your feature request related to a problem? Please describe.**

If you install `graphql-codegen` at the root of a monorepo, and then specify `documents: ["**/*.graphql"]`, you will accidentally process every document twice - once locally, once again as a child of `node_modules/`.

**Describe the solution you'd like**

`tsc` automatically excludes `node_modules/`. So does `eslint`. I think `graphql-codegen` should do the same. I can't imagine any valid reason to include it by default.

**Describe alternatives you've considered**

For now, I've added `"!node_modules/"` to my `documents`. But I think this should be built-in functionality to match the rest of the ecosystem.

**Additional context**

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.