Skip to content

Commit 9548ef4

Browse files
authored
Fix tracking codegenModels (#52)
1 parent 63b228d commit 9548ef4

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

plugin/src/main/kotlin/com/apollographql/ijplugin/telemetry/TelemetryService.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ import com.apollographql.ijplugin.telemetry.TelemetryProperty.ApolloKotlinModule
4545
import com.apollographql.ijplugin.telemetry.TelemetryProperty.ApolloLanguageVersion
4646
import com.apollographql.ijplugin.telemetry.TelemetryProperty.ApolloLinkSqlite
4747
import com.apollographql.ijplugin.telemetry.TelemetryProperty.ApolloNullableFieldStyle
48+
import com.apollographql.ijplugin.telemetry.TelemetryProperty.ApolloOperationManifestFormat
4849
import com.apollographql.ijplugin.telemetry.TelemetryProperty.ApolloServiceCount
4950
import com.apollographql.ijplugin.telemetry.TelemetryProperty.ApolloUseSemanticNaming
5051
import com.apollographql.ijplugin.telemetry.TelemetryProperty.ApolloUsedOptions
@@ -244,7 +245,8 @@ private fun ApolloGradleToolingModel.toTelemetryProperties(): Set<TelemetryPrope
244245
add(ApolloServiceCount(apolloServiceCount))
245246

246247
apolloServiceTelemetryData.forEach {
247-
it.operationManifestFormat?.let { add(ApolloCodegenModels(it)) }
248+
it.codegenModels?.let { add(ApolloCodegenModels(it)) }
249+
it.operationManifestFormat?.let { add(ApolloOperationManifestFormat(it)) }
248250
it.warnOnDeprecatedUsages?.let { add(ApolloWarnOnDeprecatedUsages(it)) }
249251
it.failOnWarnings?.let { add(ApolloFailOnWarnings(it)) }
250252
it.generateKotlinModels?.let { add(ApolloGenerateKotlinModels(it)) }

plugin/src/main/kotlin/com/apollographql/ijplugin/telemetry/TelemetrySession.kt

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,19 @@ sealed class TelemetryProperty(
7878
*/
7979
class AndroidGradlePluginVersion(version: String) : TelemetryProperty("android_agp_version", version)
8080

81+
/**
82+
* Value of the Apollo Kotlin option `operationManifestFormat` if set.
83+
*
84+
* Note: due to a typo in a previous version of the plugin, this property is tracked as `ak_codegen_models` instead of `ak_operation_manifest_format`.
85+
*/
86+
class ApolloOperationManifestFormat(operationManifestFormat: String) : TelemetryProperty("ak_codegen_models", operationManifestFormat)
87+
8188
/**
8289
* Value of the Apollo Kotlin option `codegenModels` if set.
90+
*
91+
* Note: due to a typo in a previous version of the plugin, this property is tracked as `ak_codegen_models_2` instead of `ak_codegen_models`.
8392
*/
84-
class ApolloCodegenModels(codegenModels: String) : TelemetryProperty("ak_codegen_models", codegenModels)
93+
class ApolloCodegenModels(codegenModels: String) : TelemetryProperty("ak_codegen_models_2", codegenModels)
8594

8695
/**
8796
* Value of the Apollo Kotlin option `warnOnDeprecatedUsages` if set.

0 commit comments

Comments
 (0)