Skip to content

Commit

Permalink
simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
martinbonnin committed Dec 14, 2023
1 parent 79e68b1 commit 8ca4be3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ suspend fun executeTelemetryNetworkCall(telemetrySession: TelemetrySession) {
instanceId = telemetrySession.instanceId,
properties = telemetrySession.properties.map { it.toToolingTelemetryProperty() },
events = telemetrySession.events.map { it.toTelemetryEvent() },
).getOrThrow()
)
}

@OptIn(ApolloInternal::class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ object Telemetry {
instanceId: String,
properties: List<TelemetryProperty>,
events: List<TelemetryEvent>,
): Result<Unit> {
) {
val apolloClient = newInternalPlatformApiApolloClient(serverUrl = serverUrl ?: INTERNAL_PLATFORM_API_URL)
val response = apolloClient.mutation(
TrackApolloKotlinUsageMutation(
Expand All @@ -41,8 +41,6 @@ object Telemetry {
if (response.data == null) {
throw response.toException("Cannot track Apollo Kotlin usage")
}

return Result.success(Unit)
}

@ApolloInternal
Expand Down

0 comments on commit 8ca4be3

Please sign in to comment.