Skip to content
This repository has been archived by the owner on Sep 27, 2023. It is now read-only.

Allow PascalCase type names #119

Open
jquense opened this issue Jun 21, 2019 · 3 comments
Open

Allow PascalCase type names #119

jquense opened this issue Jun 21, 2019 · 3 comments

Comments

@jquense
Copy link
Contributor

jquense commented Jun 21, 2019

Any chance ya'll be open to an option that would allow outputting Type names without an _? We always renaming types to avoid a lint error, which is admittedly a small thing, but would be nice to have a more idiomatic naming scheme

@alloy
Copy link
Member

alloy commented Sep 2, 2019

Are you referring to the private fragment reference types? E.g.

declare const _Fair_fair$ref: unique symbol;

@jquense
Copy link
Contributor Author

jquense commented Sep 3, 2019

No just fragment names themselves, This isn't something the compiler does of course, but since relay tends to insist on specfically named fragments, we end up with MyModule_prop a lot, which is fine as a fragment name but awkward as a type name used in JS

@alloy
Copy link
Member

alloy commented Sep 5, 2019

Ah yes, they are a bit awkward indeed.

I’m on the fence about it. Just yesterday I filed #132 and we ended up deciding to keep those type-alias names as-is. FWIW No team member of mine has ever asked me about the naming, thus far but I do know they sometimes copy the fragment name to use as type name.

I guess after writing that, I’m leaning more against. While awkward, consistency can sometimes be more helpful.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants