Skip to content

Commit eafdfe8

Browse files
authored
remove a few warnings (#6013)
1 parent 8fb7bd2 commit eafdfe8

File tree

39 files changed

+92
-73
lines changed

39 files changed

+92
-73
lines changed

libraries/apollo-compiler/src/test/kotlin/com/apollographql/apollo3/compiler/CodegenTest.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,6 @@ class CodegenTest {
155155
when {
156156
file.name == "companion" -> listOf(Parameters(file, MODELS_OPERATION_BASED, true))
157157
hasFragments -> {
158-
@Suppress("DEPRECATION")
159158
val list = listOf(
160159
Parameters(file, MODELS_OPERATION_BASED, true),
161160
)
@@ -254,7 +253,7 @@ class CodegenTest {
254253
"mutation_create_review", "simple_fragment", "data_builders" -> true
255254
else -> false
256255
}
257-
val operationIdGenerator = when (folder.name) {
256+
@Suppress("DEPRECATION") val operationIdGenerator = when (folder.name) {
258257
"operation_id_generator" -> object : OperationIdGenerator {
259258
override fun apply(operationDocument: String, operationName: String): String {
260259
return "hash"
@@ -279,6 +278,7 @@ class CodegenTest {
279278
?: File("src/test/graphql/schema.sdl")
280279

281280
val graphqlFiles = setOf(File(folder, "TestOperation.graphql"))
281+
@Suppress("DEPRECATION")
282282
val operationOutputGenerator = OperationOutputGenerator.Default(operationIdGenerator)
283283

284284
val targetLanguage = if (generateKotlinModels) {

libraries/apollo-engine-ktor/src/commonMain/kotlin/com/apollographql/apollo3/network/KtorExtensions.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
@file:Suppress("DEPRECATION")
2+
13
package com.apollographql.apollo3.network
24

35
import com.apollographql.apollo3.ApolloClient

libraries/apollo-idling-resource/src/main/java/com/apollographql/apollo3/android/ApolloIdlingResource.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
@file:Suppress("DEPRECATION")
2+
13
package com.apollographql.apollo3.android
24

35
import androidx.test.espresso.IdlingResource

libraries/apollo-mockserver/src/commonTest/kotlin/com/apollographql/apollo3/mockserver/test/CustomHandlerTest.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
@file:Suppress("DEPRECATION")
2+
13
package com.apollographql.apollo3.mockserver.test
24

35
import com.apollographql.apollo3.api.http.HttpMethod

libraries/apollo-mockserver/src/commonTest/kotlin/com/apollographql/apollo3/mockserver/test/EnqueueTest.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
@file:Suppress("DEPRECATION")
2+
13
package com.apollographql.apollo3.mockserver.test
24

35
import com.apollographql.apollo3.api.http.HttpMethod

libraries/apollo-mockserver/src/commonTest/kotlin/com/apollographql/apollo3/mockserver/test/SocketTest.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
@file:Suppress("DEPRECATION")
2+
13
package com.apollographql.apollo3.mockserver.test
24

35
import com.apollographql.apollo3.api.http.HttpMethod

libraries/apollo-mockserver/src/jvmTest/kotlin/com/apollographql/apollo3/mockserver/test/MultipartTest.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
@file:Suppress("DEPRECATION")
2+
13
package com.apollographql.apollo3.mockserver.test
24

35
import com.apollographql.apollo3.api.http.HttpMethod

libraries/apollo-runtime/src/androidInstrumentedTest/kotlin/instrumented/NetworkMonitorTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import com.apollographql.apollo3.interceptor.RetryOnErrorInterceptor
1010
import com.apollographql.apollo3.network.NetworkMonitor
1111
import com.apollographql.apollo3.network.http.DefaultHttpEngine
1212
import com.apollographql.apollo3.network.http.HttpEngine
13-
import com.apollographql.apollo3.testing.FooQuery
13+
import test.FooQuery
1414
import com.apollographql.apollo3.testing.mockServerTest
1515
import kotlin.test.Test
1616
import kotlin.test.assertEquals
Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.apollographql.apollo3.testing
1+
package test
22

33
import com.apollographql.apollo3.annotations.ApolloDeprecatedSince
44
import com.apollographql.apollo3.annotations.ApolloExperimental
@@ -21,11 +21,7 @@ import com.apollographql.apollo3.api.missingField
2121
*
2222
* Use it to test parts of the runtime without having to use included builds.
2323
*/
24-
@ApolloExperimental
25-
@Deprecated("This is only used for internal Apollo tests and will be removed in a future version.")
26-
@ApolloDeprecatedSince(ApolloDeprecatedSince.Version.v4_0_0)
27-
@Suppress("DEPRECATION")
28-
class FooQuery: FooOperation("query"), Query<FooOperation.Data> {
24+
internal class FooQuery: FooOperation("query"), Query<FooOperation.Data> {
2925
companion object {
3026
val successResponse = "{\"data\": {\"foo\": 42}}"
3127
}
@@ -36,11 +32,7 @@ class FooQuery: FooOperation("query"), Query<FooOperation.Data> {
3632
*
3733
* Use it to test parts of the runtime without having to use included builds.
3834
*/
39-
@ApolloExperimental
40-
@Deprecated("This is only used for internal Apollo tests and will be removed in a future version.")
41-
@ApolloDeprecatedSince(ApolloDeprecatedSince.Version.v4_0_0)
42-
@Suppress("DEPRECATION")
43-
class FooSubscription: FooOperation("subscription"), Subscription<FooOperation.Data> {
35+
internal class FooSubscription: FooOperation("subscription"), Subscription<FooOperation.Data> {
4436
companion object {
4537
fun nextMessage(id: String, foo: Int): String {
4638
return buildJsonString {
@@ -96,11 +88,7 @@ class FooSubscription: FooOperation("subscription"), Subscription<FooOperation.D
9688
* Base class for test queries.
9789
* Note we can't make [FooOperation] extend both [Query] and [Subscription] because that confuses [ApolloClient] when deciding whant NetworkTransport to use.
9890
*/
99-
@ApolloExperimental
100-
@Deprecated("This is only used for internal Apollo tests and will be removed in a future version.")
101-
@ApolloDeprecatedSince(ApolloDeprecatedSince.Version.v4_0_0)
102-
@Suppress("DEPRECATION")
103-
abstract class FooOperation(private val operationType: String): Operation<FooOperation.Data> {
91+
internal abstract class FooOperation(private val operationType: String): Operation<FooOperation.Data> {
10492
class Data(val foo: Int): Query.Data, Subscription.Data {
10593
override fun toString(): String {
10694
return "Data(foo: $foo)"

libraries/apollo-runtime/src/commonTest/kotlin/test/network/NetworkMonitorTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import com.apollographql.mockserver.MockServer
1313
import com.apollographql.mockserver.assertNoRequest
1414
import com.apollographql.mockserver.enqueueString
1515
import com.apollographql.apollo3.network.NetworkMonitor
16-
import com.apollographql.apollo3.testing.FooQuery
16+
import test.FooQuery
1717
import com.apollographql.apollo3.testing.internal.runTest
1818
import kotlinx.coroutines.CoroutineScope
1919
import kotlinx.coroutines.flow.Flow

0 commit comments

Comments
 (0)