GeneratedName
Holds both the Kotlin identifier and its corresponding wire-format name after allocation through GraphNameAllocator.
Two-Name Model
Each generated name carries two representations:
kotlinName — The collision-safe, keyword-escaped Kotlin identifier used in generated source code (e.g.
privateValue,isActive,OPEN). This is what appears as the property name, class name, or enum constant in generated.ktfiles.wireName — The original GraphQL name, never transformed. Always set before keyword escaping or collision resolution. Never derived from kotlinName. This is what gets written to
@SerialName("wireName")or@SerializedName("wireName"), ensuring correct JSON field mapping regardless of Kotlin renaming.
Invariant
// wireName is always the original -- never derived from kotlinName
val name = allocator.allocatePropertyName("private")
name.wireName == "private" // always true
name.kotlinName == "privateValue" // keyword-escaped for KotlinContent copied to clipboard
Since
1.0