You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I came across an issue while using 'The Codegen CLI' to generate code. When I tried to compile the code for a query named for say "asset", which had an output property with the same name "asset", the compilation failed. It seems that having a query and an output property with the same name caused a conflict in the generated code, resulting in compilation errors.
Version
1.1.2
Steps to reproduce the behavior
Generating swift code using moduleType: .swiftPackageManager for this query:
In above you can clearly see I have query asset and output on GroupedAssetOutput has also asset
Above query will generate this swift code:
public struct Asset: OrcaApi.SelectionSet {
...
public var asGroupedAssetOutput: AsGroupedAssetOutput? { _asInlineFragment() }
...
public struct AsGroupedAssetOutput: OrcaApi.InlineFragment {
...
public var asset: Asset { __data["asset"] }
...
public struct Asset: OrcaApi.SelectionSet {
...
public var artifactsV2: ArtifactsV2? { __data["artifactsV2"] }
...
public struct ArtifactsV2: OrcaApi.SelectionSet {
...
public var contents: [Content] { __data["contents"] }
...
public struct Content: OrcaApi.SelectionSet {
...
public var addresses: Addresses { __data["addresses"] }
...
public struct Addresses: OrcaApi.SelectionSet {
...
public var contents: [Content] { __data["contents"] }
...
public struct Content: OrcaApi.SelectionSet {
...
public var asAddressHspcOutput: AsAddressHspcOutput? { _asInlineFragment() }
...
public struct AsAddressHspcOutput: OrcaApi.InlineFragment {
...
public typealias RootEntityType = Asset.AsGroupedAssetOutput.Asset.ArtifactsV2.Content.Addresses.Content
...
}
}
}
}
}
}
}
}
I am getting an error on public typealias RootEntityType = ... . Error is
"Type ''AsGroupedAssetOutput' is not a member type of struct ProjectName.ProjectNameApi.GetAssetQuery.Data.Asset.AsGroupedAssetOutput.Asset''
The text was updated successfully, but these errors were encountered:
This may actually be resolved in the 1.1.3 patch release that came out yesterday by #2956! Please update to the new patch version and confirm if this is still an issue for us.
Summary
I came across an issue while using 'The Codegen CLI' to generate code. When I tried to compile the code for a query named for say "asset", which had an output property with the same name "asset", the compilation failed. It seems that having a query and an output property with the same name caused a conflict in the generated code, resulting in compilation errors.
Version
1.1.2
Steps to reproduce the behavior
Generating swift code using moduleType: .swiftPackageManager for this query:
In above you can clearly see I have query
asset
and output onGroupedAssetOutput
has alsoasset
Above query will generate this swift code:
I am getting an error on
public typealias RootEntityType = ...
. Error is"Type ''AsGroupedAssetOutput' is not a member type of struct ProjectName.ProjectNameApi.GetAssetQuery.Data.Asset.AsGroupedAssetOutput.Asset''
The text was updated successfully, but these errors were encountered: