Mapping classes with conflicting naming in libraries fails
This issue seems to have been introduced after 5.1.9 somewhere.
I have a schema which roughly looks like this:
enum Currency {
USD, EUR
}
type Item {
amount: Amount
currency: Currency
}
I have type mappings like this: Currency -> generated.Currency Amount -> java.lang.Long
What happens is that I do not get the type mapping as part of the import statement in the generated class. I am generating Java. The issue seems to be that the codegen actually wants to find the type it maps to, as it works if I change the mapping to an existing class.
Is this a bug or a feature? I see no reason why I shouldnt be able to use my generated classes as part of the type mapping which exists in the first place to avoid naming clashes.
Looks like a bug. You should be able to override via type mappings.
You can't use type mappings with codegen generated classes. i.e Amount should work but the type mapping for Currency will not if it is generated by codegen.
Seems like you disagree a bit here. Imo it makes a lot of sense to be able to use whatever you generate. This is an issue for all mappings using "homemade" scalars.