Skip to content

Commit 3dda73d

Browse files
authored
Fix mapping of the builtin Float scalar type (#6047)
* Map Float to Double in scalar types * Update .expected * Run CI on macos-latest * Try to make IdlingResourceTest pass * Try to make tests pass * Try to make tests pass
1 parent 70f99a0 commit 3dda73d

File tree

289 files changed

+293
-292
lines changed

Some content is hidden

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

289 files changed

+293
-292
lines changed

.github/workflows/pr.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ concurrency:
1313

1414
jobs:
1515
tests-gradle:
16-
runs-on: macos-11
16+
runs-on: macos-latest
1717
steps:
1818
- uses: actions/checkout@d0651293c4a5a52e711f25b41b05b2212f385d28 #v3
1919
- uses: actions/setup-java@2c7a4878f5d120bd643426d54ae1209b29cc01a3 #v3
@@ -39,7 +39,7 @@ jobs:
3939
path: diagnostics.zip
4040

4141
tests-no-gradle:
42-
runs-on: macos-11
42+
runs-on: macos-latest
4343
steps:
4444
- uses: actions/checkout@d0651293c4a5a52e711f25b41b05b2212f385d28 #v3
4545
- uses: actions/setup-java@2c7a4878f5d120bd643426d54ae1209b29cc01a3 #v3
@@ -65,7 +65,7 @@ jobs:
6565
path: diagnostics.zip
6666

6767
tests-integration:
68-
runs-on: macos-11
68+
runs-on: macos-latest
6969
steps:
7070
- uses: actions/checkout@d0651293c4a5a52e711f25b41b05b2212f385d28 #v3
7171
- uses: actions/setup-java@2c7a4878f5d120bd643426d54ae1209b29cc01a3 #v3

.github/workflows/push.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111

1212
jobs:
1313
deploy:
14-
runs-on: macos-11
14+
runs-on: macos-latest
1515
if: github.repository == 'apollographql/apollo-kotlin'
1616
steps:
1717
- uses: actions/checkout@d0651293c4a5a52e711f25b41b05b2212f385d28 #v3

.github/workflows/tag.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77

88
jobs:
99
publish:
10-
runs-on: macos-11
10+
runs-on: macos-latest
1111
if: github.repository == 'apollographql/apollo-kotlin'
1212
steps:
1313
- uses: actions/checkout@d0651293c4a5a52e711f25b41b05b2212f385d28 #v3

libraries/apollo-compiler/src/main/kotlin/com/apollographql/apollo3/compiler/codegen/java/file/TypesBuilder.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ internal fun IrCustomScalar.typeFieldSpec(): FieldSpec {
3535

3636
private fun builtinScalarJavaName(name: String): String? = when (name) {
3737
"Int" -> "java.lang.Integer"
38-
"Float" -> "java.lang.Float"
38+
"Float" -> "java.lang.Double"
3939
"String" -> "java.lang.String"
4040
"Boolean" -> "java.lang.Boolean"
4141
"ID" -> "java.lang.String"

libraries/apollo-compiler/src/main/kotlin/com/apollographql/apollo3/compiler/codegen/kotlin/file/TypesBuilder.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ internal fun IrCustomScalar.typePropertySpec(): PropertySpec {
3131

3232
private fun builtinScalarKotlinName(name: String): String? = when (name) {
3333
"Int" -> "kotlin.Int"
34-
"Float" -> "kotlin.Float"
34+
"Float" -> "kotlin.Double"
3535
"String" -> "kotlin.String"
3636
"Boolean" -> "kotlin.Boolean"
3737
"ID" -> "kotlin.String"

libraries/apollo-compiler/src/test/graphql/com/example/__schema/java/operationBased/__schema/type/GraphQLFloat.java.expected

Lines changed: 1 addition & 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/__schema/kotlin/responseBased/__schema/type/GraphQLFloat.kt.expected

Lines changed: 1 addition & 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/antlr_tokens/java/operationBased/antlr_tokens/type/GraphQLFloat.java.expected

Lines changed: 1 addition & 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/antlr_tokens/kotlin/responseBased/antlr_tokens/type/GraphQLFloat.kt.expected

Lines changed: 1 addition & 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/arguments_hardcoded/java/operationBased/arguments_hardcoded/type/GraphQLFloat.java.expected

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

0 commit comments

Comments
 (0)