Product
Strawberry Shake
Version
15.1.11
Link to minimal reproduction
https://github.com/karlssberg/strawberry-shake-bug
Steps to reproduce
- Create a GraphQL schema with a type containing a field named
equals:
type StringMatch {
equals: String
}
- Generate Strawberry Shake client code
- Attempt to build the project
What is expected?
The code generator should detect C# reserved method names and either:
- Automatically suffix the property name (e.g.,
Equals → EqualsValue or Equals_)
- Provide a configuration option to customize property naming
What is actually happening?
Generated code creates a property named Equals which conflicts with System.Object.Equals(object), causing compilation errors:
error CS0102: The type 'StringMatch' already contains a definition for 'Equals'
Additional context
Also affects input declarations that contain fields matching System.Object method names.