dotansimha / dotansimha/graphql-code-generator-community

[near-operation-file] Option to name generated files after operations instead of .grapqhl filenames

Open
#203 5 comments 3 reactions 1 assignee Claimed by @eddeee888 View on GitHub
Dominant language
TypeScript
Stars
137
Forks
195
Avg merge
6h 20m
Merged PRs (30d)
16

Description

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

We're looking at migrating from Apollo CLI for codegen. With Apollo, generated files are named after the operation defined in the GraphQL file. With graphql-code-generator and the near-operation-file preset, it looks like the generated files are always named after the source file name.

**Describe the solution you'd like**

It would be great to have an option to name the generated file after the operation, instead of after the source file, when using the near-operation-file preset.

**Describe alternatives you've considered**

Alternatives are to remain on the deprecated Apollo codegen, or go through our project and rename a lot of imports (possibly writing a codemod for it). I'm sure many other users are facing a similar situation.

**Additional context**

Thanks for working on this library!

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.