Welcome to the home of the Hot Chocolate GraphQL server for .NET, the Strawberry Shake GraphQL client for .NET and Banana Cake Pop the awesome Monaco based GraphQL IDE.
If the schema is of type State, an error occurs during compilation:
error CS0101: The namespace "MyNameSpace" already contains a definition for "State".
The type cannot be renamed. I am a consumer of this scheme.
schema {
query: Query
}
type Event {
idd: ID!
type: String!
productId: ID
Result: State!
}
enum State {
SUCCESS
FAIL
}
type Events {
nodes: [Event!]
totalCount: Int!
}
input EventFilterInput {
productId: ID
}
type Query {
Events(filter: EventFilterInput!): Events
}
Query:
query GetEvents($filter: EventFilterInput!) {
Events(filter: $filter) {
totalCount
nodes {
type
productId
Result
}
}
}
Compilation of the project.
Relevant log output
StrawberryShake.CodeGeneration.CSharp.Analyzers/StrawberryShake.CodeGeneration.CSharp.Analyzers.CSharpClientGenerator/GraphQLClient.StrawberryShake.cs(369,17): error CS0101: Пространство имен "MyNameSpace" уже содержит определение для "State".
StrawberryShake.CodeGeneration.CSharp.Analyzers/StrawberryShake.CodeGeneration.CSharp.Analyzers.CSharpClientGenerator/GraphQLClient.StrawberryShake.cs(365,32): error CS0538: "State.IEventFilterInputInfo" в явном объявлении интерфейса не является интерфейсом.
Just come across this too, a GraphQL endpoint we use also defines a State enum and as soon as you query a field that uses that enum, SS can no longer generate a client.
Is there an existing issue for this?
Product
Strawberry Shake
Describe the bug
If the schema is of type State, an error occurs during compilation: error CS0101: The namespace "MyNameSpace" already contains a definition for "State".
The type cannot be renamed. I am a consumer of this scheme.
Steps to reproduce
https://github.com/glen-84/hc-5710 (.NET 8, SS 13.8.1)
Query:
Relevant log output
Additional Context?
No response
Version
12.16.0