feat: add filename case support - #388
Conversation
|
This allows users to control the naming convention of generated resolver files, supporting common filename formats, while preserving original default functionality. Details: - Add change-case-all dependency to typescript-resolver-files package - Add fileOutputCasing config option with 'pascal-case' (default) and other casing support - Update preset config validation to include fileOutputCasing option - Add transformResolverFileName utility to convert resolver names to appropriate filename casing - Integrate filename transformation throughout the resolver generation pipeline - Add unit test coverage for filename transformation functionality - Add e2e test suite - Update documentation in README.md
407291a to
65cc142
Compare
|
Thank you! I'll take a look soon 👀 |
|
No hurry/pressure, but let me know if theres anything I can do to help out here. |
|
Hi @jruhland, I'm trying to think whether allowing filename case changes would open possibilities of naming clashes (the thought came from some of the unit tests - thank you!) For example, if the option is snake case, would these two types have a file name clash in our file system? type UserName
type user_nameGranted, it's unlikely codebases would allow a mix of conventions like this (but we never know 😅). |
Wow sorry missed this comment, and yeah good call out. Let me verify that, but yeah I think it would cause a collision (ive never seen snake case in graphql, but yeah im sure theres some funky codebase out there). WDYT about erroring out due to collision (only if this flag is enabled)? |
Not 100% sure of the standards on the repository, so just going to throw this up as this has been an area of friction for our team using the plugin.
We want to allows users to control the naming convention of generated resolver files,
supporting common filename formats, while preserving original default functionality. Separate of the contents inside the file.
Details: