New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
preResolveTypes
doesn't respect naming convention/prefix config options
#2174
Comments
Hi @joshlam |
Sorry, gave an incorrect example. The id will be coming from an enum. Here is an example
Fragment:
Generated types with
Generated types with
|
Thanks, I'm taking a look :) |
Fixed in: #2284 , available as alpha: |
@dotansimha Thanks for the fix! I'm running into an issue now though where types are no longer generated for some fragments, will investigate |
@joshlam can you please share a reproduction? |
It looks like what's happening is that files that import other fragments aren't getting types generated. Config:
If I have two files
and
A type will only be generated for the |
Thanks @joshlam . I'm not sure it's related to those changes, maybe it's another change we did. Any chance you can open a new issue for that? |
Yeah, it's a separate issue since encountering it with and without the |
@jkillian it's fine, because now enums are also resolved into a primitive value :) |
Fixed in 1.5.0 🎉 |
@dotansimha I'm afraid there's still issues here I believe. For example, I have this fragment type: this enum gets generated: and this actual type gets generated: Notice how Does this make sense? Let me know if you need more info or if I'm misunderstanding something! Edit: This is my config in case it helps!
|
Describe the bug
Let's say you have your config set to convert type names to
pascalCase
and prefix types withI
. You also have a type in your GraphQL schema namedMy_Type_Yo
.When
preResolveTypes
isfalse
and this type is part of aPick
, this will output something likeHowever, when
preResolveTypes
istrue
, formatting related config is ignored:Expected behavior
I would expect the config relating to conversions (pascal case, prefixing, etc.) to be respected so that the output uses types that exist within the codegen, not the non-converted type names straight from my schema.
Additional context
Skimming through the
preResolveTypes
change (#2107), it looks like the convert name function isn't being applied within the new{...}withoutPick
methods.The text was updated successfully, but these errors were encountered: