dotansimha / dotansimha/graphql-code-generator
[typescript] Allow mapping of external packages to local directories
- 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.**
We have some fragments in a shared package within a monorepo. Unless we explicitly symlink the directories, `graphql-codegen` can't find the fragments and will report `Unknown fragment xxxx`. Symlinking fixes this issue.
**Describe the solution you'd like**
I'd like to provide a list of replacement file paths for packages, e.g.
```yml
types.ts
importMapping:
@monorepo/fragments-package: '../fragments-package'
```
**Describe alternatives you've considered**
Symlinking works, but it's a long and arduous step for people setting up their repo, and we'd prefer not to require that.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.