Skip to content

Commit ea26b14

Browse files
authored
Avoid clashing with the getter field (#6093)
1 parent ae09f40 commit ea26b14

File tree

41 files changed

+258
-202
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+258
-202
lines changed

libraries/apollo-compiler/src/main/kotlin/com/apollographql/apollo/compiler/codegen/kotlin/schema/EnumAsEnumBuilder.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ internal class EnumAsEnumBuilder(
107107
.indent()
108108
.add(
109109
values.map {
110-
CodeBlock.of("%N", it.targetName.escapeKotlinReservedWordInEnum())
110+
CodeBlock.of("%T.%N", ClassName(packageName, simpleName), it.targetName.escapeKotlinReservedWordInEnum())
111111
}.joinToCode(",\n")
112112
)
113113
.unindent()

libraries/apollo-compiler/src/test/graphql/com/example/case_sensitive_enum/kotlin/responseBased/case_sensitive_enum/type/Enum.kt.expected

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

libraries/apollo-compiler/src/test/graphql/com/example/deprecation/kotlin/responseBased/deprecation/type/Episode.kt.expected

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

libraries/apollo-compiler/src/test/graphql/com/example/enum_field/java/operationBased/enum_field/type/Gravity.java.expected

Lines changed: 4 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

libraries/apollo-compiler/src/test/graphql/com/example/enum_field/java/operationBased/enum_field/type/GravityAsEnum.java.expected

Lines changed: 4 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

libraries/apollo-compiler/src/test/graphql/com/example/enum_field/kotlin/responseBased/enum_field/type/Gravity.kt.expected

Lines changed: 84 additions & 41 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

libraries/apollo-compiler/src/test/graphql/com/example/enum_field/kotlin/responseBased/enum_field/type/GravityAsEnum.kt.expected

Lines changed: 11 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

libraries/apollo-compiler/src/test/graphql/com/example/enum_field/schema.graphqls

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ enum Gravity {
1818

1919
# an enum value that clashes with the rawValue type
2020
String
21+
22+
field
2123
}
2224

2325
enum GravityAsEnum {
@@ -39,4 +41,6 @@ enum GravityAsEnum {
3941

4042
"an enum value that clashes with the rawValue type"
4143
String
44+
45+
field
4246
}

libraries/apollo-compiler/src/test/graphql/com/example/fragment_with_inline_fragment/kotlin/operationBased/fragment_with_inline_fragment/type/Episode.kt.expected

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

libraries/apollo-compiler/src/test/graphql/com/example/fragment_with_inline_fragment/kotlin/responseBased/fragment_with_inline_fragment/type/Episode.kt.expected

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)