Closed janbartosek closed 1 year ago
I guess if the type is the same it can be just deduplicated. If the type is different then I don't think we could anything but keeping the first or last. But in that case the design of the type is incorrect as a single property is ambiguous .
Do you use the latest generator version? Because there already is deduplication for UNION fields.
Yes I do. Even though there is not the latest version in the NuGet I downloaded the repository and tried it with my built of version 0.9.16.
Can you provide the schema metadata so I can use it for replicating the issue locally?
query IntrospectionQuery {
__schema {
queryType { name }
mutationType { name }
subscriptionType { name }
types {
...FullType
}
directives {
name
description
locations
args {
...InputValue
}
}
}
}
fragment FullType on __Type {
kind
name
description
fields(includeDeprecated: true) {
name
description
args {
...InputValue
}
type {
...TypeRef
}
isDeprecated
deprecationReason
}
inputFields {
...InputValue
}
interfaces {
...TypeRef
}
enumValues(includeDeprecated: true) {
name
description
isDeprecated
deprecationReason
}
possibleTypes {
...TypeRef
}
}
fragment InputValue on __InputValue {
name
description
type { ...TypeRef }
defaultValue
}
fragment TypeRef on __Type {
kind
name
ofType {
kind
name
ofType {
kind
name
ofType {
kind
name
ofType {
kind
name
ofType {
kind
name
ofType {
kind
name
}
}
}
}
}
}
}
The problem should be solved now (the new package not available yet)
Hi,
our graphql schema has some union types and the generator creates the code with multiple same-name fields.
The Union type is composed of two object types A and B, both have field "title".
Any idea how to solve this? Thanks!