Repository: apollographql/apollo-kotlin
Pull request #4662 (2023-02-01 22:28:17)

Mark most deprecated symbols with ERROR deprecation
This is a separate PR so we can easily cherry-pick it to apply it in the 3.x release branch. This way, users will have an error message instead of a removed symbol

netlify[bot]: ### <span aria-hidden="true">👷</span> Deploy Preview for *apollo-android-docs* processing.


|  Name | Link |
|---------------------------------|------------------------|
|<span aria-hidden="true">🔨</span> Latest commit | 6c4d75809fbeb2c5f3e8bc09835a417c0e743827 |
|<span aria-hidden="true">🔍</span> Latest deploy log | https://app.netlify.com/sites/apollo-android-docs/deploys/63dae78371fd620008ea6803 |

Patch:
diff --git a/docs/source/advanced/plugin-configuration.mdx b/docs/source/advanced/plugin-configuration.mdx
index 5c8d7ce3c3..adc286f646 100644
--- a/docs/source/advanced/plugin-configuration.mdx
+++ b/docs/source/advanced/plugin-configuration.mdx
@@ -46,7 +46,7 @@ If you expand your schema in a separate file, you can instruct Apollo Kotlin to
 ```kotlin
 apollo {
   service("service") {
-    schemaFiles.set(setOf(file("shared/graphql/schema.graphqls"), file("shared/graphql/extra.graphqls")))
+    schemaFiles.setFrom("shared/graphql/schema.graphqls", "shared/graphql/extra.graphqls")
   }
 }
 ```
diff --git a/libraries/apollo-api/src/commonMain/kotlin/com/apollographql/apollo3/api/ApolloResponse.kt b/libraries/apollo-api/src/commonMain/kotlin/com/apollographql/apollo3/api/ApolloResponse.kt
index 02d4ba0a32..1847d61d0f 100644
--- a/libraries/apollo-api/src/commonMain/kotlin/com/apollographql/apollo3/api/ApolloResponse.kt
+++ b/libraries/apollo-api/src/commonMain/kotlin/com/apollographql/apollo3/api/ApolloResponse.kt
@@ -138,7 +138,7 @@ private constructor(
 @Deprecated("This is a helper typealias to help migrating to 3.x " +
     "and will be removed in a future version",
     ReplaceWith("ApolloResponse"),
-    DeprecationLevel.ERROR
+    level = DeprecationLevel.ERROR
 )
 @ApolloDeprecatedSince(v3_0_0)
 typealias Response<D> = ApolloResponse<D>
diff --git a/libraries/apollo-api/src/commonMain/kotlin/com/apollographql/apollo3/api/BooleanExpression.kt b/libraries/apollo-api/src/commonMain/kotlin/com/apollographql/apollo3/api/BooleanExpression.kt
index 6380df82f7..5df5cdd5d5 100644
--- a/libraries/apollo-api/src/commonMain/kotlin/com/apollographql/apollo3/api/BooleanExpression.kt
+++ b/libraries/apollo-api/src/commonMain/kotlin/com/apollographql/apollo3/api/BooleanExpression.kt
@@ -113,7 +113,7 @@ fun <T : Any> BooleanExpression<T>.evaluate(block: (T) -> Boolean): Boolean {
   }
 }
 
-@Deprecated("Kept for binary compatibility with generated code from older versions")
+@Deprecated("Kept for binary compatibility with generated code from older versions", level = DeprecationLevel.ERROR)
 @ApolloDeprecatedSince(v3_2_1)
 @Suppress("DeprecatedCallableAddReplaceWith")
 fun BooleanExpression<BTerm>.evaluate(variables: Set<String>, typename: String?): Boolean {
diff --git a/libraries/apollo-api/src/commonMain/kotlin/com/apollographql/apollo3/api/CompiledGraphQL.kt b/libraries/apollo-api/src/commonMain/kotlin/com/apollographql/apollo3/api/CompiledGraphQL.kt
index dda52fde18..3efd7d0674 100644
--- a/libraries/apollo-api/src/commonMain/kotlin/com/apollographql/apollo3/api/CompiledGraphQL.kt
+++ b/libraries/apollo-api/src/commonMain/kotlin/com/apollographql/apollo3/api/CompiledGraphQL.kt
@@ -190,7 +190,7 @@ class ObjectType internal constructor(
   val implements = implements
   val embeddedFields = embeddedFields
 
-  @Deprecated("Use the Builder instead", ReplaceWith("ObjectType.Builder().keyFields(keyFields).implements(implements).build()"))
+  @Deprecated("Use the Builder instead", ReplaceWith("ObjectType.Builder().keyFields(keyFields).implements(implements).build()"), level = DeprecationLevel.ERROR)
   @ApolloDeprecatedSince(ApolloDeprecatedSince.Version.v3_3_2)
   constructor(
       name: String,
@@ -244,7 +244,7 @@ class InterfaceType internal constructor(
   val implements = implements
   val embeddedFields = embeddedFields
 
-  @Deprecated("Use the Builder instead", ReplaceWith("InterfaceType.Builder().keyFields(keyFields).implements(implements).build()"))
+  @Deprecated("Use the Builder instead", ReplaceWith("InterfaceType.Builder().keyFields(keyFields).implements(implements).build()"), level = DeprecationLevel.ERROR)
   @ApolloDeprecatedSince(ApolloDeprecatedSince.Version.v3_3_2)
   constructor(
       name: String,
@@ -301,7 +301,7 @@ class EnumType(
     name: String,
     val values: List<String>
 ) : CompiledNamedType(name) {
-  @Deprecated("Use the primary constructor instead")
+  @Deprecated("Use the primary constructor instead", level = DeprecationLevel.ERROR)
   @ApolloDeprecatedSince(ApolloDeprecatedSince.Version.v3_5_1)
   constructor(name: String): this(name, emptyList())
 }
@@ -344,7 +344,7 @@ class CompiledArgument private constructor(
     @ApolloExperimental
     val isPagination: Boolean = false,
 ) {
-  @Deprecated("Use the Builder instead", ReplaceWith("CompiledArgument.Builder(name = name, value = value).isKey(isKey).build()"))
+  @Deprecated("Use the Builder instead", ReplaceWith("CompiledArgument.Builder(name = name, value = value).isKey(isKey).build()"), level = DeprecationLevel.ERROR)
   @ApolloDeprecatedSince(v3_3_3)
   constructor(
       name: String,
@@ -404,31 +404,31 @@ fun resolveVariables(value: Any?, variables: Executable.Variables): Any? {
   }
 }
 
-@Deprecated("Use the generated CustomScalarType instead")
+@Deprecated("Use the generated CustomScalarType instead", level = DeprecationLevel.ERROR)
 @ApolloDeprecatedSince(v3_0_1)
 @SharedImmutable
 @JvmField
 val CompiledStringType = ScalarType("String")
 
-@Deprecated("Use the generated CustomScalarType instead")
+@Deprecated("Use the generated CustomScalarType instead", level = DeprecationLevel.ERROR)
 @ApolloDeprecatedSince(v3_0_1)
 @SharedImmutable
 @JvmField
 val CompiledIntType = ScalarType("Int")
 
-@Deprecated("Use the generated CustomScalarType instead")
+@Deprecated("Use the generated CustomScalarType instead", level = DeprecationLevel.ERROR)
 @ApolloDeprecatedSince(v3_0_1)
 @SharedImmutable
 @JvmField
 val CompiledFloatType = ScalarType("Float")
 
-@Deprecated("Use the generated CustomScalarType instead")
+@Deprecated("Use the generated CustomScalarType instead", level = DeprecationLevel.ERROR)
 @ApolloDeprecatedSince(v3_0_1)
 @SharedImmutable
 @JvmField
 val CompiledBooleanType = ScalarType("Boolean")
 
-@Deprecated("Use the generated CustomScalarType instead")
+@Deprecated("Use the generated CustomScalarType instead", level = DeprecationLevel.ERROR)
 @ApolloDeprecatedSince(v3_0_1)
 @SharedImmutable
 @JvmField
diff --git a/libraries/apollo-api/src/commonMain/kotlin/com/apollographql/apollo3/api/CustomScalarAdapters.kt b/libraries/apollo-api/src/commonMain/kotlin/com/apollographql/apollo3/api/CustomScalarAdapters.kt
index 4e461b25e7..6242609737 100644
--- a/libraries/apollo-api/src/commonMain/kotlin/com/apollographql/apollo3/api/CustomScalarAdapters.kt
+++ b/libraries/apollo-api/src/commonMain/kotlin/com/apollographql/apollo3/api/CustomScalarAdapters.kt
@@ -60,7 +60,7 @@ class CustomScalarAdapters private constructor(
     } as Adapter<T>
   }
 
-  @Deprecated("Use adapterContext.variables() instead", ReplaceWith("adapterContext.variables()"))
+  @Deprecated("Use adapterContext.variables() instead", ReplaceWith("adapterContext.variables()"), level = DeprecationLevel.ERROR)
   @ApolloDeprecatedSince(v3_2_1)
   fun variables() = adapterContext.variables()
 
@@ -97,8 +97,8 @@ class CustomScalarAdapters private constructor(
       adaptersMap[customScalarType.name] = customScalarAdapter
     }
 
-    @Suppress("DEPRECATION")
-    @Deprecated("Used for backward compatibility with 2.x")
+    @Suppress("DEPRECATION_ERROR")
+    @Deprecated("Used for backward compatibility with 2.x", level = DeprecationLevel.ERROR)
     @ApolloDeprecatedSince(v3_0_0)
     fun <T> add(
         customScalarType: CustomScalarType,
@@ -127,7 +127,7 @@ class CustomScalarAdapters private constructor(
       this.adapterContext = adapterContext
     }
 
-    @Deprecated("Use AdapterContext.Builder.variables() instead")
+    @Deprecated("Use AdapterContext.Builder.variables() instead", level = DeprecationLevel.ERROR)
     @ApolloDeprecatedSince(v3_2_1)
     fun variables(variables: Executable.Variables): Builder = apply {
       adapterContext = adapterContext.newBuilder().variables(variables).build()
diff --git a/libraries/apollo-api/src/commonMain/kotlin/com/apollographql/apollo3/api/DefaultUpload.kt b/libraries/apollo-api/src/commonMain/kotlin/com/apollographql/apollo3/api/DefaultUpload.kt
index d74c85bdf2..871c9218e3 100644
--- a/libraries/apollo-api/src/commonMain/kotlin/com/apollographql/apollo3/api/DefaultUpload.kt
+++ b/libraries/apollo-api/src/commonMain/kotlin/com/apollographql/apollo3/api/DefaultUpload.kt
@@ -42,7 +42,7 @@ class DefaultUpload internal constructor(
     private var fileName: String? = null
 
     @Deprecated("This API is dangerous because the resulting upload can only be used once and can also lead to resource leaks.",
-        ReplaceWith("content {sink ->\nval source = openSource()\nsource.use {sink.writeAll(it)}\n}"))
+        ReplaceWith("content {sink ->\nval source = openSource()\nsource.use {sink.writeAll(it)}\n}"), level = DeprecationLevel.ERROR)
     @ApolloDeprecatedSince(ApolloDeprecatedSince.Version.v3_3_3)
     fun content(content: BufferedSource): Builder = apply {
       check(writeTo == null) { "content() can only be called once" }
diff --git a/libraries/apollo-api/src/commonMain/kotlin/com/apollographql/apollo3/api/Input.kt b/libraries/apollo-api/src/commonMain/kotlin/com/apollographql/apollo3/api/Input.kt
index 7cfa3bff7a..47c3e026db 100644
--- a/libraries/apollo-api/src/commonMain/kotlin/com/apollographql/apollo3/api/Input.kt
+++ b/libraries/apollo-api/src/commonMain/kotlin/com/apollographql/apollo3/api/Input.kt
@@ -6,13 +6,13 @@ import kotlin.jvm.JvmName
 import kotlin.jvm.JvmStatic
 
 @Deprecated("Input is a helper class to help migrating to 3.x " +
-    "and will be removed in a future version")
+    "and will be removed in a future version", level = DeprecationLevel.ERROR)
 @ApolloDeprecatedSince(v3_0_0)
 class Input {
   companion object {
     @JvmStatic
     @Deprecated("optional() is a helper function to help migrating to 3.x " +
-        "and will be removed in a future version", ReplaceWith("Optional.presentIfNotNull(value)"))
+        "and will be removed in a future version", ReplaceWith("Optional.presentIfNotNull(value)"), level = DeprecationLevel.ERROR)
     @ApolloDeprecatedSince(v3_0_0)
     fun <V> optional(value: V): Optional<V> {
       return Optional.presentIfNotNull(value)
@@ -20,7 +20,7 @@ class Input {
 
     @JvmStatic
     @Deprecated("fromNullable() is a helper function to help migrating to 3.x " +
-        "and will be removed in a future version", ReplaceWith("Optional.Present(value)"))
+        "and will be removed in a future version", ReplaceWith("Optional.Present(value)"), level = DeprecationLevel.ERROR)
     @ApolloDeprecatedSince(v3_0_0)
     fun <V> fromNullable(value: V): Optional<V> {
       return Optional.Present(value)
@@ -28,7 +28,7 @@ class Input {
 
     @JvmStatic
     @Deprecated("absent() is a helper function to help migrating to 3.x " +
-        "and will be removed in a future version", ReplaceWith("Optional.Absent"))
+        "and will be removed in a future version", ReplaceWith("Optional.Absent"), level = DeprecationLevel.ERROR)
     @ApolloDeprecatedSince(v3_0_0)
     fun <V> absent(): Optional.Absent {
       return Optional.Absent
@@ -37,13 +37,13 @@ class Input {
 }
 
 @Deprecated("toInput() is a helper function to help migrating to 3.x " +
-    "and will be removed in a future version", ReplaceWith("Optional.presentIfNotNull(this)"))
+    "and will be removed in a future version", ReplaceWith("Optional.presentIfNotNull(this)"), level = DeprecationLevel.ERROR)
 @ApolloDeprecatedSince(v3_0_0)
 @JvmName("-toInputOrAbsent")
 fun <T> T.toInput(): Optional<T> = Optional.presentIfNotNull(this)
 
 @Deprecated("toInput() is a helper function to help migrating to 3.x " +
-    "and will be removed in a future version", ReplaceWith("Optional.Present(this)"))
+    "and will be removed in a future version", ReplaceWith("Optional.Present(this)"), level = DeprecationLevel.ERROR)
 @ApolloDeprecatedSince(v3_0_0)
 @JvmName("-toInput")
 fun <T : Any> T.toInput(): Optional<T> = Optional.Present(this)
diff --git a/libraries/apollo-api/src/commonMain/kotlin/com/apollographql/apollo3/api/QueryDocumentMinifier.kt b/libraries/apollo-api/src/commonMain/kotlin/com/apollographql/apollo3/api/QueryDocumentMinifier.kt
index 629f29223b..d47de8849a 100644
--- a/libraries/apollo-api/src/commonMain/kotlin/com/apollographql/apollo3/api/QueryDocumentMinifier.kt
+++ b/libraries/apollo-api/src/commonMain/kotlin/com/apollographql/apollo3/api/QueryDocumentMinifier.kt
@@ -3,7 +3,7 @@ package com.apollographql.apollo3.api
 import com.apollographql.apollo3.annotations.ApolloDeprecatedSince
 import kotlin.jvm.JvmStatic
 
-@Deprecated("Use the version in apollo-ast instead or copy paste this implementation", ReplaceWith("com.apollographql.apollo3.ast.QueryDocumentMinifier"))
+@Deprecated("Use the version in apollo-ast instead or copy paste this implementation", ReplaceWith("com.apollographql.apollo3.ast.QueryDocumentMinifier"), level = DeprecationLevel.ERROR)
 @ApolloDeprecatedSince(ApolloDeprecatedSince.Version.v3_3_1)
 object QueryDocumentMinifier {
   @JvmStatic
diff --git a/libraries/apollo-api/src/commonMain/kotlin/com/apollographql/apollo3/api/Version2CustomTypeAdapter.kt b/libraries/apollo-api/src/commonMain/kotlin/com/apollographql/apollo3/api/Version2CustomTypeAdapter.kt
index e74842a691..bab3826bc7 100644
--- a/libraries/apollo-api/src/commonMain/kotlin/com/apollographql/apollo3/api/Version2CustomTypeAdapter.kt
+++ b/libraries/apollo-api/src/commonMain/kotlin/com/apollographql/apollo3/api/Version2CustomTypeAdapter.kt
@@ -15,8 +15,9 @@ import kotlin.jvm.JvmStatic
  *
  * **Note**: [Adapter]s are called from multiple threads and implementations must be thread safe.
  */
-@Deprecated("Used for backward compatibility with 2.x, use Adapter instead")
+@Deprecated("Used for backward compatibility with 2.x, use Adapter instead", level = DeprecationLevel.ERROR)
 @ApolloDeprecatedSince(v3_0_0)
+@Suppress("DEPRECATION_ERROR")
 interface CustomTypeAdapter<T> {
   fun decode(value: CustomTypeValue<*>): T
   fun encode(value: T): CustomTypeValue<*>
@@ -28,8 +29,9 @@ interface CustomTypeAdapter<T> {
  * In your [CustomTypeAdapter], update the imports from `com.apollographql.apollo.api` to
  * `com.apollographql.apollo3.api` to use this version.
  */
-@Deprecated("Used for backward compatibility with 2.x, use Adapter instead")
+@Deprecated("Used for backward compatibility with 2.x, use Adapter instead", level = DeprecationLevel.ERROR)
 @ApolloDeprecatedSince(v3_0_0)
+@Suppress("DEPRECATION_ERROR")
 sealed class CustomTypeValue<T>(@JvmField val value: T) {
   object GraphQLNull : CustomTypeValue<Unit>(Unit)
   class GraphQLString(value: String) : CustomTypeValue<String>(value)
@@ -67,6 +69,7 @@ sealed class CustomTypeValue<T>(@JvmField val value: T) {
     level = DeprecationLevel.ERROR
 )
 @ApolloDeprecatedSince(v3_0_0)
+@Suppress("DEPRECATION_ERROR")
 class ScalarTypeAdapters(val customAdapters: Map<CustomScalarType, CustomTypeAdapter<*>>) {
   init {
     throw NotImplementedError("Use CustomScalarAdapters instead")
diff --git a/libraries/apollo-api/src/commonMain/kotlin/com/apollographql/apollo3/api/internal/Version2CustomTypeAdapterToAdapter.kt b/libraries/apollo-api/src/commonMain/kotlin/com/apollographql/apollo3/api/internal/Version2CustomTypeAdapterToAdapter.kt
index baef17856f..6996b43e46 100644
--- a/libraries/apollo-api/src/commonMain/kotlin/com/apollographql/apollo3/api/internal/Version2CustomTypeAdapterToAdapter.kt
+++ b/libraries/apollo-api/src/commonMain/kotlin/com/apollographql/apollo3/api/internal/Version2CustomTypeAdapterToAdapter.kt
@@ -1,8 +1,12 @@
+@file:Suppress("DEPRECATION_ERROR")
+
 package com.apollographql.apollo3.api.internal
 
-import com.apollographql.apollo3.api.Adapter
 import com.apollographql.apollo3.annotations.ApolloInternal
-import com.apollographql.apollo3.api.*
+import com.apollographql.apollo3.api.Adapter
+import com.apollographql.apollo3.api.CustomScalarAdapters
+import com.apollographql.apollo3.api.CustomTypeAdapter
+import com.apollographql.apollo3.api.CustomTypeValue
 import com.apollographql.apollo3.api.NullableAnyAdapter
 import com.apollographql.apollo3.api.json.JsonReader
 import com.apollographql.apollo3.api.json.JsonWriter
@@ -10,7 +14,6 @@ import com.apollographql.apollo3.api.json.JsonWriter
 /**
  * An [Adapter] that wraps an Apollo Android v2 style [CustomTypeAdapter], to ease migration from v2 to v3.
  */
-@Suppress("DEPRECATION")
 @ApolloInternal
 class Version2CustomTypeAdapterToAdapter<T>(
     private val v2CustomTypeAdapter: CustomTypeAdapter<T>,
diff --git a/libraries/apollo-api/src/commonMain/kotlin/com/apollographql/apollo3/exception/Exceptions.kt b/libraries/apollo-api/src/commonMain/kotlin/com/apollographql/apollo3/exception/Exceptions.kt
index 8e3b2f8c9f..eca42dba50 100644
--- a/libraries/apollo-api/src/commonMain/kotlin/com/apollographql/apollo3/exception/Exceptions.kt
+++ b/libraries/apollo-api/src/commonMain/kotlin/com/apollographql/apollo3/exception/Exceptions.kt
@@ -9,7 +9,6 @@ import com.apollographql.apollo3.annotations.ApolloExperimental
 import com.apollographql.apollo3.annotations.ApolloInternal
 import com.apollographql.apollo3.api.http.HttpHeader
 import okio.BufferedSource
-import kotlin.jvm.JvmOverloads
 
 /**
  * The base class for all exceptions
@@ -125,7 +124,7 @@ class CacheMissException @ApolloInternal constructor(
     }
 
     @ApolloDeprecatedSince(v3_3_1)
-    @Deprecated("Use CacheMissException.message instead")
+    @Deprecated("Use CacheMissException.message instead", level = DeprecationLevel.ERROR)
     fun message(key: String?, fieldName: String?): String {
       return message(key, fieldName, false)
     }
@@ -171,7 +170,7 @@ class HttpCacheMissException(message: String, cause: Exception? = null) : Apollo
  */
 class ApolloCompositeException(first: Throwable?, second: Throwable?) : ApolloException(message = "multiple exceptions happened", second) {
 
-  @get:Deprecated("Use suppressedExceptions instead", ReplaceWith("suppressedExceptions.first()"))
+  @get:Deprecated("Use suppressedExceptions instead", ReplaceWith("suppressedExceptions.first()"), level = DeprecationLevel.ERROR)
   @ApolloDeprecatedSince(v3_1_1)
   val first: ApolloException
     get() {
@@ -179,7 +178,7 @@ class ApolloCompositeException(first: Throwable?, second: Throwable?) : ApolloEx
       return (firstException as? ApolloException) ?: throw RuntimeException("unexpected first exception", firstException)
     }
 
-  @get:Deprecated("Use suppressedExceptions instead", ReplaceWith("suppressedExceptions.getOrNull(1)"))
+  @get:Deprecated("Use suppressedExceptions instead", ReplaceWith("suppressedExceptions.getOrNull(1)"), level = DeprecationLevel.ERROR)
   @ApolloDeprecatedSince(v3_1_1)
   val second: ApolloException
     get() {
@@ -200,12 +199,12 @@ class MissingValueException : ApolloException(message = "The optional doesn't ha
 /**
  * Something went wrong but it's not sure exactly what
  */
-@Deprecated("This is only used in the JVM runtime and is scheduled for removal")
+@Deprecated("This is only used in the JVM runtime and is scheduled for removal", level = DeprecationLevel.ERROR)
 @ApolloDeprecatedSince(v3_0_0)
 class ApolloGenericException(message: String? = null, cause: Throwable? = null) : ApolloException(message = message, cause = cause)
 
 
-@Deprecated("This is only used in the JVM runtime and is scheduled for removal")
+@Deprecated("This is only used in the JVM runtime and is scheduled for removal", level = DeprecationLevel.ERROR)
 @ApolloDeprecatedSince(v3_0_0)
 class ApolloCanceledException(message: String? = null, cause: Throwable? = null) : ApolloException(message = message, cause = cause)
 
diff --git a/libraries/apollo-api/src/jvmMain/kotlin/com/apollographql/apollo3/api/FileUpload.kt b/libraries/apollo-api/src/jvmMain/kotlin/com/apollographql/apollo3/api/FileUpload.kt
index 60a4b49d4d..84af55f5f8 100644
--- a/libraries/apollo-api/src/jvmMain/kotlin/com/apollographql/apollo3/api/FileUpload.kt
+++ b/libraries/apollo-api/src/jvmMain/kotlin/com/apollographql/apollo3/api/FileUpload.kt
@@ -9,7 +9,7 @@ import okio.buffer
 import okio.source
 import java.io.File
 
-@Deprecated("Use File.toUpload() instead")
+@Deprecated("Use File.toUpload() instead", level = DeprecationLevel.ERROR)
 @ApolloDeprecatedSince(v3_3_3)
 fun DefaultUpload.Builder.content(file: File): DefaultUpload.Builder {
   return content { sink ->
@@ -33,7 +33,7 @@ fun File.toUpload(contentType: String): DefaultUpload {
     ReplaceWith(
         "File(filePath).toUpload(mimetype)",
         imports = ["java.io.File"]
-    )
+    ), level = DeprecationLevel.ERROR
 )
 @ApolloDeprecatedSince(v3_0_0)
 fun create(mimetype: String, filePath: String): Upload {
diff --git a/libraries/apollo-ast/src/main/kotlin/com/apollographql/apollo3/ast/Schema.kt b/libraries/apollo-ast/src/main/kotlin/com/apollographql/apollo3/ast/Schema.kt
index 7a487b04ba..18540ebc5a 100644
--- a/libraries/apollo-ast/src/main/kotlin/com/apollographql/apollo3/ast/Schema.kt
+++ b/libraries/apollo-ast/src/main/kotlin/com/apollographql/apollo3/ast/Schema.kt
@@ -38,7 +38,7 @@ class Schema internal constructor(
    *
    * See also [validateAsSchema] and [toSchema]
    */
-  @Deprecated("Use validateAsSchema() to get a Schema")
+  @Deprecated("Use validateAsSchema() to get a Schema", level = DeprecationLevel.ERROR)
   @ApolloDeprecatedSince(ApolloDeprecatedSince.Version.v3_3_1)
   constructor(definitions: List<GQLDefinition>) : this(
       definitions,
diff --git a/libraries/apollo-ast/src/main/kotlin/com/apollographql/apollo3/ast/gqldirective.kt b/libraries/apollo-ast/src/main/kotlin/com/apollographql/apollo3/ast/gqldirective.kt
index f6c835ab15..409537d27f 100644
--- a/libraries/apollo-ast/src/main/kotlin/com/apollographql/apollo3/ast/gqldirective.kt
+++ b/libraries/apollo-ast/src/main/kotlin/com/apollographql/apollo3/ast/gqldirective.kt
@@ -57,7 +57,7 @@ fun List<GQLDirective>.findTargetName(schema: Schema): String? = firstOrNull { s
 /**
  * @return `true` or `false` based on the `if` argument if the `optional` directive is present, `null` otherwise
  */
-@Deprecated("This method is for use in Apollo Kotlin only, please file an issue if you need it")
+@Deprecated("This method is for use in Apollo Kotlin only, please file an issue if you need it", level = DeprecationLevel.ERROR)
 @ApolloDeprecatedSince(ApolloDeprecatedSince.Version.v3_3_1)
 fun List<GQLDirective>.optionalValue(): Boolean? = optionalValue(null)
 
@@ -71,13 +71,13 @@ fun List<GQLDirective>.optionalValue(schema: Schema?): Boolean? {
 
 @Deprecated("This function doesn't work with foreign definitions. " +
     "More generally, it wasn't meant to be used outside Apollo Kotlin." +
-    "Please file an issue if you need something like this.")
+    "Please file an issue if you need something like this.", level = DeprecationLevel.ERROR)
 @ApolloDeprecatedSince(ApolloDeprecatedSince.Version.v3_3_1)
 fun List<GQLDirective>.findNonnull() = any { it.name == Schema.NONNULL }
 
 @ApolloInternal
 fun List<GQLDirective>.findNonnull(schema: Schema) = any { schema.originalDirectiveName(it.name) == Schema.NONNULL }
 
-@Deprecated("This function is misleading as it only enumerates the stripable directive. Use apolloDefinitions() instead.")
+@Deprecated("This function is misleading as it only enumerates the stripable directive. Use apolloDefinitions() instead.", level = DeprecationLevel.ERROR)
 @ApolloDeprecatedSince(ApolloDeprecatedSince.Version.v3_3_1)
 fun GQLDirective.isApollo() = name in listOf(Schema.OPTIONAL, Schema.NONNULL)
diff --git a/libraries/apollo-ast/src/main/kotlin/com/apollographql/apollo3/ast/gqldocument.kt b/libraries/apollo-ast/src/main/kotlin/com/apollographql/apollo3/ast/gqldocument.kt
index 66aee01fa8..507e6184b8 100644
--- a/libraries/apollo-ast/src/main/kotlin/com/apollographql/apollo3/ast/gqldocument.kt
+++ b/libraries/apollo-ast/src/main/kotlin/com/apollographql/apollo3/ast/gqldocument.kt
@@ -13,19 +13,19 @@ fun GQLDocument.withoutBuiltinDefinitions(): GQLDocument {
 }
 
 @ApolloDeprecatedSince(ApolloDeprecatedSince.Version.v3_3_1)
-@Deprecated("This method is deprecated and will be removed in a future version")
+@Deprecated("This method is deprecated and will be removed in a future version", level = DeprecationLevel.ERROR)
 fun GQLDocument.withBuiltinDirectives(): GQLDocument {
   return withDefinitions(builtinDefinitions().filterIsInstance<GQLDirectiveDefinition>())
 }
 
 @ApolloDeprecatedSince(ApolloDeprecatedSince.Version.v3_3_1)
-@Deprecated("This method is deprecated and will be removed in a future version")
+@Deprecated("This method is deprecated and will be removed in a future version", level = DeprecationLevel.ERROR)
 fun GQLDocument.withoutBuiltinDirectives(): GQLDocument {
   return withoutDefinitions(builtinDefinitions().filterIsInstance<GQLDirectiveDefinition>())
 }
 
 @ApolloDeprecatedSince(ApolloDeprecatedSince.Version.v3_3_1)
-@Deprecated("This method is deprecated and will be removed in a future version")
+@Deprecated("This method is deprecated and will be removed in a future version", level = DeprecationLevel.ERROR)
 fun GQLDocument.withApolloDefinitions(): GQLDocument {
   @Suppress("DEPRECATION")
   return withDefinitions(apolloDefinitions())
diff --git a/libraries/apollo-ast/src/main/kotlin/com/apollographql/apollo3/ast/gqltypedefinition.kt b/libraries/apollo-ast/src/main/kotlin/com/apollographql/apollo3/ast/gqltypedefinition.kt
index f090987c19..eb21530985 100644
--- a/libraries/apollo-ast/src/main/kotlin/com/apollographql/apollo3/ast/gqltypedefinition.kt
+++ b/libraries/apollo-ast/src/main/kotlin/com/apollographql/apollo3/ast/gqltypedefinition.kt
@@ -14,7 +14,7 @@ fun GQLTypeDefinition.possibleTypes(schema: Schema): Set<String> {
   return schema.possibleTypes(this)
 }
 
-@Deprecated("This method is for use in Apollo Kotlin only, please file an issue if you need it")
+@Deprecated("This method is for use in Apollo Kotlin only, please file an issue if you need it", level = DeprecationLevel.ERROR)
 @ApolloDeprecatedSince(ApolloDeprecatedSince.Version.v3_3_1)
 fun GQLTypeDefinition.isFieldNonNull(fieldName: String): Boolean = isFieldNonNull(fieldName, null)
 
diff --git a/libraries/apollo-compiler/api/apollo-compiler.api b/libraries/apollo-compiler/api/apollo-compiler.api
index 9519274536..ed72dd793e 100644
--- a/libraries/apollo-compiler/api/apollo-compiler.api
+++ b/libraries/apollo-compiler/api/apollo-compiler.api
@@ -773,15 +773,6 @@ public final class com/apollographql/apollo3/compiler/introspection/Introspectio
 	public fun toString ()Ljava/lang/String;
 }
 
-public final class com/apollographql/apollo3/compiler/introspection/IntrospectionSchemaJsonAdapter : com/squareup/moshi/JsonAdapter {
-	public fun <init> (Lcom/squareup/moshi/Moshi;)V
-	public fun fromJson (Lcom/squareup/moshi/JsonReader;)Lcom/apollographql/apollo3/compiler/introspection/IntrospectionSchema;
-	public synthetic fun fromJson (Lcom/squareup/moshi/JsonReader;)Ljava/lang/Object;
-	public fun toJson (Lcom/squareup/moshi/JsonWriter;Lcom/apollographql/apollo3/compiler/introspection/IntrospectionSchema;)V
-	public synthetic fun toJson (Lcom/squareup/moshi/JsonWriter;Ljava/lang/Object;)V
-	public fun toString ()Ljava/lang/String;
-}
-
 public final class com/apollographql/apollo3/compiler/introspection/IntrospectionSchemaKt {
 	public static final fun normalize (Lcom/apollographql/apollo3/compiler/introspection/IntrospectionSchema$Schema;)Lcom/apollographql/apollo3/compiler/introspection/IntrospectionSchema$Schema;
 	public static final fun normalize (Lcom/apollographql/apollo3/compiler/introspection/IntrospectionSchema;)Lcom/apollographql/apollo3/compiler/introspection/IntrospectionSchema;
@@ -791,149 +782,6 @@ public final class com/apollographql/apollo3/compiler/introspection/Introspectio
 	public static synthetic fun toIntrospectionSchema$default (Lokio/BufferedSource;Ljava/lang/String;ILjava/lang/Object;)Lcom/apollographql/apollo3/compiler/introspection/IntrospectionSchema;
 }
 
-public final class com/apollographql/apollo3/compiler/introspection/IntrospectionSchema_SchemaJsonAdapter : com/squareup/moshi/JsonAdapter {
-	public fun <init> (Lcom/squareup/moshi/Moshi;)V
-	public fun fromJson (Lcom/squareup/moshi/JsonReader;)Lcom/apollographql/apollo3/compiler/introspection/IntrospectionSchema$Schema;
-	public synthetic fun fromJson (Lcom/squareup/moshi/JsonReader;)Ljava/lang/Object;
-	public fun toJson (Lcom/squareup/moshi/JsonWriter;Lcom/apollographql/apollo3/compiler/introspection/IntrospectionSchema$Schema;)V
-	public synthetic fun toJson (Lcom/squareup/moshi/JsonWriter;Ljava/lang/Object;)V
-	public fun toString ()Ljava/lang/String;
-}
-
-public final class com/apollographql/apollo3/compiler/introspection/IntrospectionSchema_Schema_FieldJsonAdapter : com/squareup/moshi/JsonAdapter {
-	public fun <init> (Lcom/squareup/moshi/Moshi;)V
-	public fun fromJson (Lcom/squareup/moshi/JsonReader;)Lcom/apollographql/apollo3/compiler/introspection/IntrospectionSchema$Schema$Field;
-	public synthetic fun fromJson (Lcom/squareup/moshi/JsonReader;)Ljava/lang/Object;
-	public fun toJson (Lcom/squareup/moshi/JsonWriter;Lcom/apollographql/apollo3/compiler/introspection/IntrospectionSchema$Schema$Field;)V
-	public synthetic fun toJson (Lcom/squareup/moshi/JsonWriter;Ljava/lang/Object;)V
-	public fun toString ()Ljava/lang/String;
-}
-
-public final class com/apollographql/apollo3/compiler/introspection/IntrospectionSchema_Schema_Field_ArgumentJsonAdapter : com/squareup/moshi/JsonAdapter {
-	public fun <init> (Lcom/squareup/moshi/Moshi;)V
-	public fun fromJson (Lcom/squareup/moshi/JsonReader;)Lcom/apollographql/apollo3/compiler/introspection/IntrospectionSchema$Schema$Field$Argument;
-	public synthetic fun fromJson (Lcom/squareup/moshi/JsonReader;)Ljava/lang/Object;
-	public fun toJson (Lcom/squareup/moshi/JsonWriter;Lcom/apollographql/apollo3/compiler/introspection/IntrospectionSchema$Schema$Field$Argument;)V
-	public synthetic fun toJson (Lcom/squareup/moshi/JsonWriter;Ljava/lang/Object;)V
-	public fun toString ()Ljava/lang/String;
-}
-
-public final class com/apollographql/apollo3/compiler/introspection/IntrospectionSchema_Schema_InputFieldJsonAdapter : com/squareup/moshi/JsonAdapter {
-	public fun <init> (Lcom/squareup/moshi/Moshi;)V
-	public fun fromJson (Lcom/squareup/moshi/JsonReader;)Lcom/apollographql/apollo3/compiler/introspection/IntrospectionSchema$Schema$InputField;
-	public synthetic fun fromJson (Lcom/squareup/moshi/JsonReader;)Ljava/lang/Object;
-	public fun toJson (Lcom/squareup/moshi/JsonWriter;Lcom/apollographql/apollo3/compiler/introspection/IntrospectionSchema$Schema$InputField;)V
-	public synthetic fun toJson (Lcom/squareup/moshi/JsonWriter;Ljava/lang/Object;)V
-	public fun toString ()Ljava/lang/String;
-}
-
-public final class com/apollographql/apollo3/compiler/introspection/IntrospectionSchema_Schema_MutationTypeJsonAdapter : com/squareup/moshi/JsonAdapter {
-	public fun <init> (Lcom/squareup/moshi/Moshi;)V
-	public fun fromJson (Lcom/squareup/moshi/JsonReader;)Lcom/apollographql/apollo3/compiler/introspection/IntrospectionSchema$Schema$MutationType;
-	public synthetic fun fromJson (Lcom/squareup/moshi/JsonReader;)Ljava/lang/Object;
-	public fun toJson (Lcom/squareup/moshi/JsonWriter;Lcom/apollographql/apollo3/compiler/introspection/IntrospectionSchema$Schema$MutationType;)V
-	public synthetic fun toJson (Lcom/squareup/moshi/JsonWriter;Ljava/lang/Object;)V
-	public fun toString ()Ljava/lang/String;
-}
-
-public final class com/apollographql/apollo3/compiler/introspection/IntrospectionSchema_Schema_QueryTypeJsonAdapter : com/squareup/moshi/JsonAdapter {
-	public fun <init> (Lcom/squareup/moshi/Moshi;)V
-	public fun fromJson (Lcom/squareup/moshi/JsonReader;)Lcom/apollographql/apollo3/compiler/introspection/IntrospectionSchema$Schema$QueryType;
-	public synthetic fun fromJson (Lcom/squareup/moshi/JsonReader;)Ljava/lang/Object;
-	public fun toJson (Lcom/squareup/moshi/JsonWriter;Lcom/apollographql/apollo3/compiler/introspection/IntrospectionSchema$Schema$QueryType;)V
-	public synthetic fun toJson (Lcom/squareup/moshi/JsonWriter;Ljava/lang/Object;)V
-	public fun toString ()Ljava/lang/String;
-}
-
-public final class com/apollographql/apollo3/compiler/introspection/IntrospectionSchema_Schema_SubscriptionTypeJsonAdapter : com/squareup/moshi/JsonAdapter {
-	public fun <init> (Lcom/squareup/moshi/Moshi;)V
-	public fun fromJson (Lcom/squareup/moshi/JsonReader;)Lcom/apollographql/apollo3/compiler/introspection/IntrospectionSchema$Schema$SubscriptionType;
-	public synthetic fun fromJson (Lcom/squareup/moshi/JsonReader;)Ljava/lang/Object;
-	public fun toJson (Lcom/squareup/moshi/JsonWriter;Lcom/apollographql/apollo3/compiler/introspection/IntrospectionSchema$Schema$SubscriptionType;)V
-	public synthetic fun toJson (Lcom/squareup/moshi/JsonWriter;Ljava/lang/Object;)V
-	public fun toString ()Ljava/lang/String;
-}
-
-public final class com/apollographql/apollo3/compiler/introspection/IntrospectionSchema_Schema_TypeJsonAdapter : com/squareup/moshi/JsonAdapter {
-	public fun <init> (Lcom/squareup/moshi/Moshi;)V
-	public fun fromJson (Lcom/squareup/moshi/JsonReader;)Lcom/apollographql/apollo3/compiler/introspection/IntrospectionSchema$Schema$Type;
-	public synthetic fun fromJson (Lcom/squareup/moshi/JsonReader;)Ljava/lang/Object;
-	public fun toJson (Lcom/squareup/moshi/JsonWriter;Lcom/apollographql/apollo3/compiler/introspection/IntrospectionSchema$Schema$Type;)V
-	public synthetic fun toJson (Lcom/squareup/moshi/JsonWriter;Ljava/lang/Object;)V
-}
-
-public final class com/apollographql/apollo3/compiler/introspection/IntrospectionSchema_Schema_TypeRefJsonAdapter : com/squareup/moshi/JsonAdapter {
-	public fun <init> (Lcom/squareup/moshi/Moshi;)V
-	public fun fromJson (Lcom/squareup/moshi/JsonReader;)Lcom/apollographql/apollo3/compiler/introspection/IntrospectionSchema$Schema$TypeRef;
-	public synthetic fun fromJson (Lcom/squareup/moshi/JsonReader;)Ljava/lang/Object;
-	public fun toJson (Lcom/squareup/moshi/JsonWriter;Lcom/apollographql/apollo3/compiler/introspection/IntrospectionSchema$Schema$TypeRef;)V
-	public synthetic fun toJson (Lcom/squareup/moshi/JsonWriter;Ljava/lang/Object;)V
-	public fun toString ()Ljava/lang/String;
-}
-
-public final class com/apollographql/apollo3/compiler/introspection/IntrospectionSchema_Schema_Type_EnumJsonAdapter : com/squareup/moshi/JsonAdapter {
-	public fun <init> (Lcom/squareup/moshi/Moshi;)V
-	public fun fromJson (Lcom/squareup/moshi/JsonReader;)Lcom/apollographql/apollo3/compiler/introspection/IntrospectionSchema$Schema$Type$Enum;
-	public synthetic fun fromJson (Lcom/squareup/moshi/JsonReader;)Ljava/lang/Object;
-	public fun toJson (Lcom/squareup/moshi/JsonWriter;Lcom/apollographql/apollo3/compiler/introspection/IntrospectionSchema$Schema$Type$Enum;)V
-	public synthetic fun toJson (Lcom/squareup/moshi/JsonWriter;Ljava/lang/Object;)V
-	public fun toString ()Ljava/lang/String;
-}
-
-public final class com/apollographql/apollo3/compiler/introspection/IntrospectionSchema_Schema_Type_Enum_ValueJsonAdapter : com/squareup/moshi/JsonAdapter {
-	public fun <init> (Lcom/squareup/moshi/Moshi;)V
-	public fun fromJson (Lcom/squareup/moshi/JsonReader;)Lcom/apollographql/apollo3/compiler/introspection/IntrospectionSchema$Schema$Type$Enum$Value;
-	public synthetic fun fromJson (Lcom/squareup/moshi/JsonReader;)Ljava/lang/Object;
-	public fun toJson (Lcom/squareup/moshi/JsonWriter;Lcom/apollographql/apollo3/compiler/introspection/IntrospectionSchema$Schema$Type$Enum$Value;)V
-	public synthetic fun toJson (Lcom/squareup/moshi/JsonWriter;Ljava/lang/Object;)V
-	public fun toString ()Ljava/lang/String;
-}
-
-public final class com/apollographql/apollo3/compiler/introspection/IntrospectionSchema_Schema_Type_InputObjectJsonAdapter : com/squareup/moshi/JsonAdapter {
-	public fun <init> (Lcom/squareup/moshi/Moshi;)V
-	public fun fromJson (Lcom/squareup/moshi/JsonReader;)Lcom/apollographql/apollo3/compiler/introspection/IntrospectionSchema$Schema$Type$InputObject;
-	public synthetic fun fromJson (Lcom/squareup/moshi/JsonReader;)Ljava/lang/Object;
-	public fun toJson (Lcom/squareup/moshi/JsonWriter;Lcom/apollographql/apollo3/compiler/introspection/IntrospectionSchema$Schema$Type$InputObject;)V
-	public synthetic fun toJson (Lcom/squareup/moshi/JsonWriter;Ljava/lang/Object;)V
-	public fun toString ()Ljava/lang/String;
-}
-
-public final class com/apollographql/apollo3/compiler/introspection/IntrospectionSchema_Schema_Type_InterfaceJsonAdapter : com/squareup/moshi/JsonAdapter {
-	public fun <init> (Lcom/squareup/moshi/Moshi;)V
-	public fun fromJson (Lcom/squareup/moshi/JsonReader;)Lcom/apollographql/apollo3/compiler/introspection/IntrospectionSchema$Schema$Type$Interface;
-	public synthetic fun fromJson (Lcom/squareup/moshi/JsonReader;)Ljava/lang/Object;
-	public fun toJson (Lcom/squareup/moshi/JsonWriter;Lcom/apollographql/apollo3/compiler/introspection/IntrospectionSchema$Schema$Type$Interface;)V
-	public synthetic fun toJson (Lcom/squareup/moshi/JsonWriter;Ljava/lang/Object;)V
-	public fun toString ()Ljava/lang/String;
-}
-
-public final class com/apollographql/apollo3/compiler/introspection/IntrospectionSchema_Schema_Type_ObjectJsonAdapter : com/squareup/moshi/JsonAdapter {
-	public fun <init> (Lcom/squareup/moshi/Moshi;)V
-	public fun fromJson (Lcom/squareup/moshi/JsonReader;)Lcom/apollographql/apollo3/compiler/introspection/IntrospectionSchema$Schema$Type$Object;
-	public synthetic fun fromJson (Lcom/squareup/moshi/JsonReader;)Ljava/lang/Object;
-	public fun toJson (Lcom/squareup/moshi/JsonWriter;Lcom/apollographql/apollo3/compiler/introspection/IntrospectionSchema$Schema$Type$Object;)V
-	public synthetic fun toJson (Lcom/squareup/moshi/JsonWriter;Ljava/lang/Object;)V
-	public fun toString ()Ljava/lang/String;
-}
-
-public final class com/apollographql/apollo3/compiler/introspection/IntrospectionSchema_Schema_Type_ScalarJsonAdapter : com/squareup/moshi/JsonAdapter {
-	public fun <init> (Lcom/squareup/moshi/Moshi;)V
-	public fun fromJson (Lcom/squareup/moshi/JsonReader;)Lcom/apollographql/apollo3/compiler/introspection/IntrospectionSchema$Schema$Type$Scalar;
-	public synthetic fun fromJson (Lcom/squareup/moshi/JsonReader;)Ljava/lang/Object;
-	public fun toJson (Lcom/squareup/moshi/JsonWriter;Lcom/apollographql/apollo3/compiler/introspection/IntrospectionSchema$Schema$Type$Scalar;)V
-	public synthetic fun toJson (Lcom/squareup/moshi/JsonWriter;Ljava/lang/Object;)V
-	public fun toString ()Ljava/lang/String;
-}
-
-public final class com/apollographql/apollo3/compiler/introspection/IntrospectionSchema_Schema_Type_UnionJsonAdapter : com/squareup/moshi/JsonAdapter {
-	public fun <init> (Lcom/squareup/moshi/Moshi;)V
-	public fun fromJson (Lcom/squareup/moshi/JsonReader;)Lcom/apollographql/apollo3/compiler/introspection/IntrospectionSchema$Schema$Type$Union;
-	public synthetic fun fromJson (Lcom/squareup/moshi/JsonReader;)Ljava/lang/Object;
-	public fun toJson (Lcom/squareup/moshi/JsonWriter;Lcom/apollographql/apollo3/compiler/introspection/IntrospectionSchema$Schema$Type$Union;)V
-	public synthetic fun toJson (Lcom/squareup/moshi/JsonWriter;Ljava/lang/Object;)V
-	public fun toString ()Ljava/lang/String;
-}
-
 public final class com/apollographql/apollo3/compiler/introspection/Introspection_to_schemaKt {
 }
 
diff --git a/libraries/apollo-compiler/src/main/kotlin/com/apollographql/apollo3/compiler/ApolloCompiler.kt b/libraries/apollo-compiler/src/main/kotlin/com/apollographql/apollo3/compiler/ApolloCompiler.kt
index f7b9e713f3..3ed3318195 100644
--- a/libraries/apollo-compiler/src/main/kotlin/com/apollographql/apollo3/compiler/ApolloCompiler.kt
+++ b/libraries/apollo-compiler/src/main/kotlin/com/apollographql/apollo3/compiler/ApolloCompiler.kt
@@ -22,8 +22,8 @@ import com.apollographql.apollo3.compiler.hooks.ApolloCompilerJavaHooks
 import com.apollographql.apollo3.compiler.hooks.ApolloCompilerKotlinHooks
 import com.apollographql.apollo3.compiler.ir.DefaultIrOperations
 import com.apollographql.apollo3.compiler.ir.IrOperations
-import com.apollographql.apollo3.compiler.ir.IrSchemaBuilder
 import com.apollographql.apollo3.compiler.ir.IrOperationsBuilder
+import com.apollographql.apollo3.compiler.ir.IrSchemaBuilder
 import com.apollographql.apollo3.compiler.operationoutput.OperationDescriptor
 import com.apollographql.apollo3.compiler.operationoutput.OperationOutput
 import okio.buffer
@@ -235,7 +235,7 @@ object ApolloCompiler {
         .toSet()
     val unknownScalars = scalarMapping.keys.subtract(schemaScalars)
     check(unknownScalars.isEmpty()) {
-      "Apollo: unknown custom scalar(s) in customScalarsMapping: ${unknownScalars.joinToString(",")}"
+      "Apollo: unknown scalar(s): ${unknownScalars.joinToString(",")}"
     }
   }
 
diff --git a/libraries/apollo-compiler/src/main/kotlin/com/apollographql/apollo3/compiler/Options.kt b/libraries/apollo-compiler/src/main/kotlin/com/apollographql/apollo3/compiler/Options.kt
index 8072731b93..e1c4ee4d7c 100644
--- a/libraries/apollo-compiler/src/main/kotlin/com/apollographql/apollo3/compiler/Options.kt
+++ b/libraries/apollo-compiler/src/main/kotlin/com/apollographql/apollo3/compiler/Options.kt
@@ -32,7 +32,7 @@ enum class TargetLanguage {
   // The order is important. See [isTargetLanguageVersionAtLeast]
   JAVA,
 
-  @Deprecated("Use KOTLIN_1_5", replaceWith = ReplaceWith("KOTLIN_1_5"))
+  @Deprecated("Use KOTLIN_1_5", replaceWith = ReplaceWith("KOTLIN_1_5"), level = DeprecationLevel.ERROR)
   @ApolloDeprecatedSince(v3_3_1)
   KOTLIN_1_4,
 
diff --git a/libraries/apollo-compiler/src/main/kotlin/com/apollographql/apollo3/compiler/introspection/IntrospectionSchema.kt b/libraries/apollo-compiler/src/main/kotlin/com/apollographql/apollo3/compiler/introspection/IntrospectionSchema.kt
index 3b5dbee2cd..110fddc645 100644
--- a/libraries/apollo-compiler/src/main/kotlin/com/apollographql/apollo3/compiler/introspection/IntrospectionSchema.kt
+++ b/libraries/apollo-compiler/src/main/kotlin/com/apollographql/apollo3/compiler/introspection/IntrospectionSchema.kt
@@ -1,9 +1,8 @@
-@file:Suppress("DEPRECATION")
+@file:Suppress("DEPRECATION_ERROR")
 package com.apollographql.apollo3.compiler.introspection
 
 import com.apollographql.apollo3.annotations.ApolloDeprecatedSince
 import com.apollographql.apollo3.compiler.fromJson
-import com.squareup.moshi.JsonClass
 import com.squareup.moshi.JsonReader
 import dev.zacsweers.moshix.sealed.annotations.TypeLabel
 import okio.Buffer
@@ -13,42 +12,34 @@ import okio.buffer
 import okio.source
 import java.io.File
 
-@JsonClass(generateAdapter = true)
 @ApolloDeprecatedSince(ApolloDeprecatedSince.Version.v3_3_1)
-@Deprecated("Use the apollo-ast version instead", ReplaceWith("IntrospectionSchema", "com.apollographql.apollo3.ast.introspection"))
+@Deprecated("Use the apollo-ast version instead", ReplaceWith("IntrospectionSchema", "com.apollographql.apollo3.ast.introspection"), level = DeprecationLevel.ERROR)
 data class IntrospectionSchema(
     val __schema: Schema,
 ) {
-  @JsonClass(generateAdapter = true)
   data class Schema(
       val queryType: QueryType,
       val mutationType: MutationType?,
       val subscriptionType: SubscriptionType?,
       val types: List<Type>,
   ) {
-    @JsonClass(generateAdapter = true)
     data class QueryType(val name: String)
 
-    @JsonClass(generateAdapter = true)
     data class MutationType(val name: String)
 
-    @JsonClass(generateAdapter = true)
     data class SubscriptionType(val name: String)
 
-    @JsonClass(generateAdapter = true, generator = "sealed:kind")
     sealed class Type {
       abstract val name: String
       abstract val description: String?
 
       @TypeLabel("SCALAR")
-      @JsonClass(generateAdapter = true)
       data class Scalar(
           override val name: String,
           override val description: String?,
       ) : Type()
 
       @TypeLabel("OBJECT")
-      @JsonClass(generateAdapter = true)
       data class Object(
           override val name: String,
           override val description: String?,
@@ -57,7 +48,6 @@ data class IntrospectionSchema(
       ) : Type()
 
       @TypeLabel("INTERFACE")
-      @JsonClass(generateAdapter = true)
       data class Interface(
           override val name: String,
           override val description: String?,
@@ -68,7 +58,6 @@ data class IntrospectionSchema(
       ) : Type()
 
       @TypeLabel("UNION")
-      @JsonClass(generateAdapter = true)
       data class Union(
           override val name: String,
           override val description: String?,
@@ -77,7 +66,6 @@ data class IntrospectionSchema(
       ) : Type()
 
       @TypeLabel("ENUM")
-      @JsonClass(generateAdapter = true)
       data class Enum(
           override val name: String,
           override val description: String?,
@@ -85,7 +73,6 @@ data class IntrospectionSchema(
       ) : Type() {
 
 
-        @JsonClass(generateAdapter = true)
         data class Value(
             val name: String,
             val description: String?,
@@ -95,7 +82,6 @@ data class IntrospectionSchema(
       }
 
       @TypeLabel("INPUT_OBJECT")
-      @JsonClass(generateAdapter = true)
       data class InputObject(
           override val name: String,
           override val description: String?,
@@ -104,7 +90,6 @@ data class IntrospectionSchema(
     }
 
 
-    @JsonClass(generateAdapter = true)
     data class InputField(
         val name: String,
         val description: String?,
@@ -114,7 +99,6 @@ data class IntrospectionSchema(
         val defaultValue: Any?,
     )
 
-    @JsonClass(generateAdapter = true)
     data class Field(
         val name: String,
         val description: String?,
@@ -124,7 +108,6 @@ data class IntrospectionSchema(
         val args: List<Argument> = emptyList(),
     ) {
 
-      @JsonClass(generateAdapter = true)
       data class Argument(
           val name: String,
           val description: String?,
@@ -138,7 +121,6 @@ data class IntrospectionSchema(
     /**
      * An introspection TypeRef
      */
-    @JsonClass(generateAdapter = true)
     data class TypeRef(
         val kind: Kind,
         val name: String? = "",
diff --git a/libraries/apollo-compiler/src/main/kotlin/com/apollographql/apollo3/compiler/introspection/introspection_to_schema.kt b/libraries/apollo-compiler/src/main/kotlin/com/apollographql/apollo3/compiler/introspection/introspection_to_schema.kt
index 525f776b4d..d97385edbe 100644
--- a/libraries/apollo-compiler/src/main/kotlin/com/apollographql/apollo3/compiler/introspection/introspection_to_schema.kt
+++ b/libraries/apollo-compiler/src/main/kotlin/com/apollographql/apollo3/compiler/introspection/introspection_to_schema.kt
@@ -1,4 +1,4 @@
-@file:Suppress("DEPRECATION")
+@file:Suppress("DEPRECATION_ERROR")
 package com.apollographql.apollo3.compiler.introspection
 
 import com.apollographql.apollo3.annotations.ApolloDeprecatedSince
@@ -287,7 +287,7 @@ private class GQLDocumentBuilder(private val introspectionSchema: IntrospectionS
  */
 @ApolloExperimental
 @ApolloDeprecatedSince(ApolloDeprecatedSince.Version.v3_3_1)
-@Deprecated("Use the apollo-ast version instead", ReplaceWith("GQLDocumentBuilder", "com.apollographql.apollo3.ast.introspection"))
+@Deprecated("Use the apollo-ast version instead", ReplaceWith("GQLDocumentBuilder", "com.apollographql.apollo3.ast.introspection"), level = DeprecationLevel.ERROR)
 fun IntrospectionSchema.toGQLDocument(filePath: String? = null): GQLDocument = GQLDocumentBuilder(this, filePath)
     .toGQLDocument()
     /**
@@ -302,7 +302,7 @@ fun IntrospectionSchema.toGQLDocument(filePath: String? = null): GQLDocument = G
  */
 @ApolloExperimental
 @ApolloDeprecatedSince(ApolloDeprecatedSince.Version.v3_3_1)
-@Deprecated("Use the apollo-ast version instead", ReplaceWith("toSchema", "com.apollographql.apollo3.ast.introspection"))
+@Deprecated("Use the apollo-ast version instead", ReplaceWith("toSchema", "com.apollographql.apollo3.ast.introspection"), level = DeprecationLevel.ERROR)
 fun IntrospectionSchema.toSchema(): Schema = toGQLDocument().validateAsSchema().valueAssertNoErrors()
 
 /**
@@ -310,7 +310,7 @@ fun IntrospectionSchema.toSchema(): Schema = toGQLDocument().validateAsSchema().
  */
 @ApolloExperimental
 @ApolloDeprecatedSince(ApolloDeprecatedSince.Version.v3_3_1)
-@Deprecated("Use the apollo-ast version instead", ReplaceWith("toSchemaGQLDocument", "com.apollographql.apollo3.ast.introspection"))
+@Deprecated("Use the apollo-ast version instead", ReplaceWith("toSchemaGQLDocument", "com.apollographql.apollo3.ast.introspection"), level = DeprecationLevel.ERROR)
 fun File.toSchemaGQLDocument(): GQLDocument {
   return if (extension == "json") {
     toIntrospectionSchema().toGQLDocument(filePath = path)
@@ -321,5 +321,5 @@ fun File.toSchemaGQLDocument(): GQLDocument {
 
 @ApolloExperimental
 @ApolloDeprecatedSince(ApolloDeprecatedSince.Version.v3_3_1)
-@Deprecated("Use the apollo-ast version instead", ReplaceWith("toSchema", "com.apollographql.apollo3.ast.introspection"))
+@Deprecated("Use the apollo-ast version instead", ReplaceWith("toSchema", "com.apollographql.apollo3.ast.introspection"), level = DeprecationLevel.ERROR)
 fun File.toSchema(): Schema = toSchemaGQLDocument().validateAsSchema().valueAssertNoErrors()
diff --git a/libraries/apollo-compiler/src/main/kotlin/com/apollographql/apollo3/compiler/introspection/schema_to_introspection.kt b/libraries/apollo-compiler/src/main/kotlin/com/apollographql/apollo3/compiler/introspection/schema_to_introspection.kt
index ac173e490f..14b9869b0c 100644
--- a/libraries/apollo-compiler/src/main/kotlin/com/apollographql/apollo3/compiler/introspection/schema_to_introspection.kt
+++ b/libraries/apollo-compiler/src/main/kotlin/com/apollographql/apollo3/compiler/introspection/schema_to_introspection.kt
@@ -1,4 +1,4 @@
-@file:Suppress("DEPRECATION")
+@file:Suppress("DEPRECATION_ERROR")
 package com.apollographql.apollo3.compiler.introspection
 
 import com.apollographql.apollo3.annotations.ApolloDeprecatedSince
@@ -204,12 +204,12 @@ internal fun GQLTypeDefinition.schemaKind() = when (this) {
 }
 
 @ApolloDeprecatedSince(ApolloDeprecatedSince.Version.v3_3_1)
-@Deprecated("Use the apollo-ast version instead", ReplaceWith("toIntrospectionSchema", "com.apollographql.apollo3.ast.introspection"))
+@Deprecated("Use the apollo-ast version instead", ReplaceWith("toIntrospectionSchema", "com.apollographql.apollo3.ast.introspection"), level = DeprecationLevel.ERROR)
 fun Schema.toIntrospectionSchema() = IntrospectionSchemaBuilder(this).toIntrospectionSchema()
 
 
 @ApolloDeprecatedSince(ApolloDeprecatedSince.Version.v3_3_1)
-@Deprecated("Use the apollo-ast version instead", ReplaceWith("toKotlinValue", "com.apollographql.apollo3.ast.introspection"))
+@Deprecated("Use the apollo-ast version instead", ReplaceWith("toKotlinValue", "com.apollographql.apollo3.ast.introspection"), level = DeprecationLevel.ERROR)
 fun GQLValue.toKotlinValue(constContext: Boolean): Any? {
   return when (this) {
     is GQLIntValue -> value
diff --git a/libraries/apollo-gradle-plugin-external/src/main/kotlin/com/apollographql/apollo3/gradle/api/Service.kt b/libraries/apollo-gradle-plugin-external/src/main/kotlin/com/apollographql/apollo3/gradle/api/Service.kt
index 046d13caf3..af86074820 100644
--- a/libraries/apollo-gradle-plugin-external/src/main/kotlin/com/apollographql/apollo3/gradle/api/Service.kt
+++ b/libraries/apollo-gradle-plugin-external/src/main/kotlin/com/apollographql/apollo3/gradle/api/Service.kt
@@ -453,7 +453,7 @@ interface Service {
    * Default: false
    */
   @ApolloExperimental
-  @Deprecated("use generateModelBuilders instead", ReplaceWith("generateModelBuilders"))
+  @Deprecated("use generateModelBuilders instead", ReplaceWith("generateModelBuilders"), level = DeprecationLevel.ERROR)
   @ApolloDeprecatedSince(ApolloDeprecatedSince.Version.v3_6_3)
   val generateModelBuilder: Property<Boolean>
 
diff --git a/libraries/apollo-gradle-plugin-external/src/main/kotlin/com/apollographql/apollo3/gradle/internal/DefaultApolloExtension.kt b/libraries/apollo-gradle-plugin-external/src/main/kotlin/com/apollographql/apollo3/gradle/internal/DefaultApolloExtension.kt
index fee0a1a8bb..c730d3aab7 100644
--- a/libraries/apollo-gradle-plugin-external/src/main/kotlin/com/apollographql/apollo3/gradle/internal/DefaultApolloExtension.kt
+++ b/libraries/apollo-gradle-plugin-external/src/main/kotlin/com/apollographql/apollo3/gradle/internal/DefaultApolloExtension.kt
@@ -55,7 +55,7 @@ abstract class DefaultApolloExtension(
   private val schemaConfiguration: Configuration
   private val usedCoordinatesConfiguration: Configuration
   private val rootProvider: TaskProvider<Task>
-  private var registerDefaultService = true
+  private var hasExplicitService = false
   private var adhocComponentWithVariants: AdhocComponentWithVariants? = null
 
   @get:Inject
@@ -129,14 +129,35 @@ abstract class DefaultApolloExtension(
     }
 
     project.afterEvaluate {
-      if (registerDefaultService) {
+      @Suppress("DEPRECATION")
+      val hasApolloBlock = !defaultService.graphqlSourceDirectorySet.isEmpty
+          || defaultService.schemaFile.isPresent
+          || !defaultService.schemaFiles.isEmpty
+          || defaultService.alwaysGenerateTypesMatching.isPresent
+          || defaultService.scalarTypeMapping.isNotEmpty()
+          || defaultService.scalarAdapterMapping.isNotEmpty()
+          || defaultService.customScalarsMapping.isPresent
+          || defaultService.customTypeMapping.isPresent
+          || defaultService.excludes.isPresent
+          || defaultService.includes.isPresent
+          || defaultService.failOnWarnings.isPresent
+          || defaultService.generateApolloMetadata.isPresent
+          || defaultService.generateAsInternal.isPresent
+          || defaultService.codegenModels.isPresent
+          || defaultService.addTypename.isPresent
+          || defaultService.generateFragmentImplementations.isPresent
+          || defaultService.requiresOptInAnnotation.isPresent
+          || defaultService.packageName.isPresent
+          || defaultService.packageNameGenerator.isPresent
+
+      if (hasApolloBlock) {
         val packageNameLine = if (defaultService.packageName.isPresent) {
           "packageName.set(\"${defaultService.packageName.get()}\")"
         } else {
           "packageNamesFromFilePaths()"
         }
-        it.logger.warn("""
-            Apollo: using the default service is deprecated and will be removed in a future version. Please define your service explicitly:
+        error("""
+            Apollo: using the default service is deprecated. Please define your service explicitly:
             
             apollo {
               service("service") {
@@ -144,42 +165,6 @@ abstract class DefaultApolloExtension(
               }
             }
           """.trimIndent())
-        registerService(defaultService)
-      } else {
-        @Suppress("DEPRECATION")
-        check(defaultService.graphqlSourceDirectorySet.isEmpty
-            && defaultService.schemaFile.isPresent.not()
-            && defaultService.schemaFiles.isEmpty
-            && defaultService.alwaysGenerateTypesMatching.isPresent.not()
-            && defaultService.scalarTypeMapping.isEmpty()
-            && defaultService.scalarAdapterMapping.isEmpty()
-            && defaultService.customScalarsMapping.isPresent.not()
-            && defaultService.customTypeMapping.isPresent.not()
-            && defaultService.excludes.isPresent.not()
-            && defaultService.includes.isPresent.not()
-            && defaultService.failOnWarnings.isPresent.not()
-            && defaultService.generateApolloMetadata.isPresent.not()
-            && defaultService.generateAsInternal.isPresent.not()
-            && defaultService.codegenModels.isPresent.not()
-            && defaultService.addTypename.isPresent.not()
-            && defaultService.generateFragmentImplementations.isPresent.not()
-            && defaultService.requiresOptInAnnotation.isPresent.not()
-        ) {
-          """
-            Configuring the default service is ignored if you specify other services, remove your configuration from the root of the apollo {} block:
-            apollo {
-              // remove everything at the top level
-              
-              // add individual services
-              service("service1") {
-                // ...
-              }
-              service("service2") {
-                // ...
-              }
-            }
-          """.trimIndent()
-        }
       }
 
       maybeLinkSqlite()
@@ -221,7 +206,7 @@ abstract class DefaultApolloExtension(
    * Call from users to explicitly register a service or by the plugin to register the implicit service
    */
   override fun service(name: String, action: Action<Service>) {
-    registerDefaultService = false
+    hasExplicitService = false
 
     val service = project.objects.newInstance(DefaultService::class.java, project, name)
     action.execute(service)
@@ -538,7 +523,7 @@ abstract class DefaultApolloExtension(
       }
 
       project.androidExtension != null -> {
-        if (registerDefaultService) {
+        if (hasExplicitService) {
           // The default service is created from `afterEvaluate` and it looks like it's too late to register new sources
           @Suppress("DEPRECATION")
           connection.connectToAndroidSourceSet("main")
@@ -662,16 +647,45 @@ abstract class DefaultApolloExtension(
       task.failOnWarnings.set(service.failOnWarnings)
 
       @Suppress("DEPRECATION")
-      val scalarTypeMappingFallbackOldSyntax = service.customScalarsMapping.orElse(
-          service.customTypeMapping
-      ).getOrElse(emptyMap())
-
-      check(service.scalarTypeMapping.isEmpty() || scalarTypeMappingFallbackOldSyntax.isEmpty()) {
-        "Apollo: either mapScalar() or customScalarsMapping can be used, but not both"
+      check(!service.customScalarsMapping.isPresent) {
+        """
+          Apollo: customScalarsMapping is deprecated. Use mapScalar() instead.
+          For an example, replace:
+          
+          customScalarsMapping = ["Date": "java.util.Date"]
+          or
+          customScalarsMapping.put("Date", "java.util.Date")
+          or
+          customScalarsMapping.set(mapOf("Date" to "java.util.Date"))
+          
+          With:
+          
+          mapScalar("Date", "java.util.Date")
+                    
+          If you have several scalars, call mapScalar() several times.
+        """.trimIndent()
       }
-      task.scalarTypeMapping.set(
-          service.scalarTypeMapping.ifEmpty { scalarTypeMappingFallbackOldSyntax }
-      )
+      @Suppress("DEPRECATION")
+      check(!service.customTypeMapping.isPresent) {
+        """
+          Apollo: customTypeMapping is deprecated. Use mapScalar() instead.
+          For an example, replace:
+          
+          customTypeMapping = ["Date": "java.util.Date"]
+          or
+          customTypeMapping.put("Date", "java.util.Date")
+          or
+          customTypeMapping.set(mapOf("Date" to "java.util.Date"))
+          
+          With:
+          
+          mapScalar("Date", "java.util.Date")
+
+          If you have several scalars, call mapScalar() several times.
+        """.trimIndent()
+      }
+
+      task.scalarTypeMapping.set(service.scalarTypeMapping)
       task.scalarAdapterMapping.set(service.scalarAdapterMapping)
       task.outputDir.apply {
         set(service.outputDir.orElse(BuildDirLayout.outputDir(project, service)).get())
@@ -729,8 +743,7 @@ abstract class DefaultApolloExtension(
       task.generateQueryDocument.set(service.generateQueryDocument)
       task.generateSchema.set(service.generateSchema)
       task.generatedSchemaName.set(service.generatedSchemaName)
-      @Suppress("DEPRECATION")
-      task.generateModelBuilders.set(service.generateModelBuilders.orElse(service.generateModelBuilder))
+      task.generateModelBuilders.set(service.generateModelBuilders)
       task.codegenModels.set(service.codegenModels)
       task.addTypename.set(service.addTypename)
       task.flattenModels.set(service.flattenModels)
@@ -837,7 +850,7 @@ abstract class DefaultApolloExtension(
      * The android plugin will call us back when the variants are ready but before `afterEvaluate`,
      * disable the default service
      */
-    registerDefaultService = false
+    hasExplicitService = true
 
     check(!File(sourceFolder).isRooted && !sourceFolder.startsWith("../..")) {
       """
@@ -865,7 +878,7 @@ abstract class DefaultApolloExtension(
   }
 
   override fun createAllKotlinSourceSetServices(sourceFolder: String, nameSuffix: String, action: Action<Service>) {
-    registerDefaultService = false
+    hasExplicitService = true
 
     check(!File(sourceFolder).isRooted && !sourceFolder.startsWith("../..")) {
       """Apollo: using 'sourceFolder = "$sourceFolder"' makes no sense with Kotlin source sets as the same generated models will be used in all source sets.
diff --git a/libraries/apollo-gradle-plugin-external/src/main/kotlin/com/apollographql/apollo3/gradle/internal/KotlinPluginFacade.kt b/libraries/apollo-gradle-plugin-external/src/main/kotlin/com/apollographql/apollo3/gradle/internal/KotlinPluginFacade.kt
index 9f7aebd95e..2a5a3f7a04 100644
--- a/libraries/apollo-gradle-plugin-external/src/main/kotlin/com/apollographql/apollo3/gradle/internal/KotlinPluginFacade.kt
+++ b/libraries/apollo-gradle-plugin-external/src/main/kotlin/com/apollographql/apollo3/gradle/internal/KotlinPluginFacade.kt
@@ -8,7 +8,6 @@ import com.apollographql.apollo3.gradle.api.kotlinProjectExtensionOrThrow
 import org.gradle.api.Action
 import org.gradle.api.Project
 import org.jetbrains.kotlin.gradle.plugin.getKotlinPluginVersion
-import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeCompilation
 import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget
 
 /**
@@ -17,6 +16,7 @@ import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget
  * exception is thrown
  */
 fun getKotlinTargetLanguage(userSpecified: String?): TargetLanguage {
+  @Suppress("DEPRECATION_ERROR")
   return when (userSpecified) {
     "1.4" -> TargetLanguage.KOTLIN_1_4
     "1.5" -> TargetLanguage.KOTLIN_1_5
diff --git a/libraries/apollo-http-cache/src/main/kotlin/com/apollographql/apollo3/cache/http/CachingHttpInterceptor.kt b/libraries/apollo-http-cache/src/main/kotlin/com/apollographql/apollo3/cache/http/CachingHttpInterceptor.kt
index f50cb4c0ad..0b60c8696c 100644
--- a/libraries/apollo-http-cache/src/main/kotlin/com/apollographql/apollo3/cache/http/CachingHttpInterceptor.kt
+++ b/libraries/apollo-http-cache/src/main/kotlin/com/apollographql/apollo3/cache/http/CachingHttpInterceptor.kt
@@ -160,13 +160,13 @@ class CachingHttpInterceptor(
     return response
   }
 
-  @Deprecated("Use store.clearAll() instead", ReplaceWith("store.clearAll()"))
+  @Deprecated("Use store.clearAll() instead", ReplaceWith("store.clearAll()"), level = DeprecationLevel.ERROR)
   @ApolloDeprecatedSince(ApolloDeprecatedSince.Version.v3_1_1)
   fun delete() {
     lruHttpCache.clearAll()
   }
 
-  @Deprecated("Use store.remove(key) instead", ReplaceWith("store.remove(key)"))
+  @Deprecated("Use store.remove(key) instead", ReplaceWith("store.remove(key)"), level = DeprecationLevel.ERROR)
   @ApolloDeprecatedSince(ApolloDeprecatedSince.Version.v3_1_1)
   fun remove(key: String) {
     lruHttpCache.remove(key)
diff --git a/libraries/apollo-http-cache/src/main/kotlin/com/apollographql/apollo3/cache/http/DiskLruHttpCache.kt b/libraries/apollo-http-cache/src/main/kotlin/com/apollographql/apollo3/cache/http/DiskLruHttpCache.kt
index 1d078b33ad..556f98cbc9 100644
--- a/libraries/apollo-http-cache/src/main/kotlin/com/apollographql/apollo3/cache/http/DiskLruHttpCache.kt
+++ b/libraries/apollo-http-cache/src/main/kotlin/com/apollographql/apollo3/cache/http/DiskLruHttpCache.kt
@@ -90,7 +90,7 @@ class DiskLruHttpCache(private val fileSystem: FileSystem, private val directory
   }
 
   @Throws(IOException::class)
-  @Deprecated("Use clearAll() instead", ReplaceWith("clearAll"))
+  @Deprecated("Use clearAll() instead", ReplaceWith("clearAll"), level = DeprecationLevel.ERROR)
   @ApolloDeprecatedSince(ApolloDeprecatedSince.Version.v3_1_1)
   fun delete() {
     clearAll()
diff --git a/libraries/apollo-idling-resource/src/main/java/com/apollographql/apollo3/android/ApolloIdlingResource.kt b/libraries/apollo-idling-resource/src/main/java/com/apollographql/apollo3/android/ApolloIdlingResource.kt
index a818b6e4cd..f9c49bdaa8 100644
--- a/libraries/apollo-idling-resource/src/main/java/com/apollographql/apollo3/android/ApolloIdlingResource.kt
+++ b/libraries/apollo-idling-resource/src/main/java/com/apollographql/apollo3/android/ApolloIdlingResource.kt
@@ -51,7 +51,7 @@ class ApolloIdlingResource(
     @Deprecated(
         message = "Used for backward compatibility with 2.x. You now need to pass your ApolloIdlingResource to your ApolloClient.Builder." +
             " See https://www.apollographql.com/docs/android/migration/3.0/ for more details.",
-        ReplaceWith("ApolloIdlingResource(name)")
+        ReplaceWith("ApolloIdlingResource(name)"), level = DeprecationLevel.ERROR
     )
     @Suppress("UNUSED_PARAMETER")
     @ApolloDeprecatedSince(v3_0_0)
diff --git a/libraries/apollo-mockserver/src/commonMain/kotlin/com/apollographql/apollo3/mockserver/MockServerCommon.kt b/libraries/apollo-mockserver/src/commonMain/kotlin/com/apollographql/apollo3/mockserver/MockServerCommon.kt
index bd38af93c3..49096e5e15 100644
--- a/libraries/apollo-mockserver/src/commonMain/kotlin/com/apollographql/apollo3/mockserver/MockServerCommon.kt
+++ b/libraries/apollo-mockserver/src/commonMain/kotlin/com/apollographql/apollo3/mockserver/MockServerCommon.kt
@@ -1,3 +1,4 @@
+@file:Suppress("DEPRECATION_ERROR")
 package com.apollographql.apollo3.mockserver
 
 import com.apollographql.apollo3.annotations.ApolloDeprecatedSince
@@ -47,7 +48,7 @@ suspend fun writeResponse(sink: BufferedSink, mockResponse: MockResponse, versio
 }
 
 class MockResponse
-@Deprecated("Use MockResponse.Builder instead", ReplaceWith("MockResponse.Builder().statusCode(statusCode).headers(headers).body(body).delayMillis(delayMillis).build()"))
+@Deprecated("Use MockResponse.Builder instead", ReplaceWith("MockResponse.Builder().statusCode(statusCode).headers(headers).body(body).delayMillis(delayMillis).build()"), level = DeprecationLevel.ERROR)
 @ApolloDeprecatedSince(v3_3_1)
 constructor(
     val statusCode: Int = 200,
@@ -55,7 +56,7 @@ constructor(
     val headers: Map<String, String> = mapOf("Content-Length" to "0"),
     val delayMillis: Long = 0,
 ) {
-  @Deprecated("Use MockResponse.Builder instead", ReplaceWith("MockResponse.Builder().statusCode(statusCode).headers(headers).body(body).delayMillis(delayMillis).build()"))
+  @Deprecated("Use MockResponse.Builder instead", ReplaceWith("MockResponse.Builder().statusCode(statusCode).headers(headers).body(body).delayMillis(delayMillis).build()"), level = DeprecationLevel.ERROR)
   @ApolloDeprecatedSince(v3_3_1)
   @Suppress("DEPRECATION")
   @JvmOverloads
@@ -71,9 +72,8 @@ constructor(
       delayMillis = delayMillis,
   )
 
-  @Deprecated("Use MockResponse.Builder instead", ReplaceWith("MockResponse.Builder().statusCode(statusCode).body(body).headers(headers).delayMillis(delayMillis).build()"))
+  @Deprecated("Use MockResponse.Builder instead", ReplaceWith("MockResponse.Builder().statusCode(statusCode).body(body).headers(headers).delayMillis(delayMillis).build()"), level = DeprecationLevel.ERROR)
   @ApolloDeprecatedSince(v3_3_1)
-  @Suppress("DEPRECATION")
   constructor(
       body: ByteString,
       statusCode: Int = 200,
diff --git a/libraries/apollo-normalized-cache-api-incubating/src/commonMain/kotlin/com/apollographql/apollo3/cache/normalized/api/CacheHeaders.kt b/libraries/apollo-normalized-cache-api-incubating/src/commonMain/kotlin/com/apollographql/apollo3/cache/normalized/api/CacheHeaders.kt
index 3b8a600d97..b2fdd79514 100644
--- a/libraries/apollo-normalized-cache-api-incubating/src/commonMain/kotlin/com/apollographql/apollo3/cache/normalized/api/CacheHeaders.kt
+++ b/libraries/apollo-normalized-cache-api-incubating/src/commonMain/kotlin/com/apollographql/apollo3/cache/normalized/api/CacheHeaders.kt
@@ -29,7 +29,7 @@ class CacheHeaders internal constructor(private val headerMap: Map<String, Strin
   /**
    * @return A [CacheHeaders.Builder] with a copy of this [CacheHeaders] values.
    */
-  @Deprecated("Use newBuilder() instead", ReplaceWith("newBuilder()"))
+  @Deprecated("Use newBuilder() instead", ReplaceWith("newBuilder()"), level = DeprecationLevel.ERROR)
   @ApolloDeprecatedSince(ApolloDeprecatedSince.Version.v3_3_1)
   fun toBuilder(): Builder = newBuilder()
 
diff --git a/libraries/apollo-normalized-cache-api-incubating/src/commonMain/kotlin/com/apollographql/apollo3/cache/normalized/api/CacheKey.kt b/libraries/apollo-normalized-cache-api-incubating/src/commonMain/kotlin/com/apollographql/apollo3/cache/normalized/api/CacheKey.kt
index 570ba2ab59..d403174b3a 100644
--- a/libraries/apollo-normalized-cache-api-incubating/src/commonMain/kotlin/com/apollographql/apollo3/cache/normalized/api/CacheKey.kt
+++ b/libraries/apollo-normalized-cache-api-incubating/src/commonMain/kotlin/com/apollographql/apollo3/cache/normalized/api/CacheKey.kt
@@ -75,14 +75,14 @@ class CacheKey constructor(val key: String) {
     /**
      * Helper function to build a cache key from a list of strings
      */
-    @Deprecated("Use the constructor instead", ReplaceWith("CacheKey(typename, values)"))
+    @Deprecated("Use the constructor instead", ReplaceWith("CacheKey(typename, values)"), level = DeprecationLevel.ERROR)
     @ApolloDeprecatedSince(v3_0_0)
     fun from(typename: String, values: List<String>) = CacheKey(typename, values)
 
     /**
      * Helper function to build a cache key from a list of strings
      */
-    @Deprecated("Use the constructor instead", ReplaceWith("CacheKey(typename, values)"))
+    @Deprecated("Use the constructor instead", ReplaceWith("CacheKey(typename, values)"), level = DeprecationLevel.ERROR)
     @ApolloDeprecatedSince(v3_0_0)
     fun from(typename: String, vararg values: String) = CacheKey(typename, values.toList())
   }
diff --git a/libraries/apollo-normalized-cache-api-incubating/src/commonMain/kotlin/com/apollographql/apollo3/cache/normalized/api/OperationCacheExtensions.kt b/libraries/apollo-normalized-cache-api-incubating/src/commonMain/kotlin/com/apollographql/apollo3/cache/normalized/api/OperationCacheExtensions.kt
index 0fb39c99a5..a3b17c3bad 100644
--- a/libraries/apollo-normalized-cache-api-incubating/src/commonMain/kotlin/com/apollographql/apollo3/cache/normalized/api/OperationCacheExtensions.kt
+++ b/libraries/apollo-normalized-cache-api-incubating/src/commonMain/kotlin/com/apollographql/apollo3/cache/normalized/api/OperationCacheExtensions.kt
@@ -71,6 +71,7 @@ fun <D : Executable.Data> Executable<D>.readDataFromCache(
     cacheHeaders = cacheHeaders,
 )
 
+@Deprecated("Use Executable.readDataFromCache instead", level = DeprecationLevel.ERROR)
 @ApolloDeprecatedSince(ApolloDeprecatedSince.Version.v3_3_2)
 fun <D : Fragment.Data> Fragment<D>.readDataFromCache(
     cacheKey: CacheKey,
diff --git a/libraries/apollo-normalized-cache-api-incubating/src/commonMain/kotlin/com/apollographql/apollo3/cache/normalized/api/RecordFieldJsonAdapter.kt b/libraries/apollo-normalized-cache-api-incubating/src/commonMain/kotlin/com/apollographql/apollo3/cache/normalized/api/RecordFieldJsonAdapter.kt
index f843fb8e54..51ba540ed1 100644
--- a/libraries/apollo-normalized-cache-api-incubating/src/commonMain/kotlin/com/apollographql/apollo3/cache/normalized/api/RecordFieldJsonAdapter.kt
+++ b/libraries/apollo-normalized-cache-api-incubating/src/commonMain/kotlin/com/apollographql/apollo3/cache/normalized/api/RecordFieldJsonAdapter.kt
@@ -3,16 +3,16 @@ package com.apollographql.apollo3.cache.normalized.api
 import com.apollographql.apollo3.annotations.ApolloDeprecatedSince
 import com.apollographql.apollo3.cache.normalized.api.internal.JsonRecordSerializer
 
-@Deprecated("Use JsonRecordSerializer instead")
+@Deprecated("Use JsonRecordSerializer instead", level = DeprecationLevel.ERROR)
 @ApolloDeprecatedSince(ApolloDeprecatedSince.Version.v3_3_1)
 object RecordFieldJsonAdapter {
-  @Deprecated("Use JsonRecordSerializer instead", ReplaceWith("JsonRecordSerializer.deserialize(json)"))
+  @Deprecated("Use JsonRecordSerializer instead", ReplaceWith("JsonRecordSerializer.deserialize(json)"), level = DeprecationLevel.ERROR)
   @ApolloDeprecatedSince(ApolloDeprecatedSince.Version.v3_3_1)
   fun fromJson(jsonFieldSource: String): Map<String, Any?> {
     return JsonRecordSerializer.deserialize("", jsonFieldSource).fields
   }
 
-  @Deprecated("Use JsonRecordSerializer instead", ReplaceWith("JsonRecordSerializer.serialize(fields)"))
+  @Deprecated("Use JsonRecordSerializer instead", ReplaceWith("JsonRecordSerializer.serialize(fields)"), level = DeprecationLevel.ERROR)
   @ApolloDeprecatedSince(ApolloDeprecatedSince.Version.v3_3_1)
   fun toJson(fields: Map<String, Any?>): String {
     return JsonRecordSerializer.serialize(Record("", fields))
diff --git a/libraries/apollo-normalized-cache-api/src/commonMain/kotlin/com/apollographql/apollo3/cache/normalized/api/CacheHeaders.kt b/libraries/apollo-normalized-cache-api/src/commonMain/kotlin/com/apollographql/apollo3/cache/normalized/api/CacheHeaders.kt
index 3b8a600d97..b2fdd79514 100644
--- a/libraries/apollo-normalized-cache-api/src/commonMain/kotlin/com/apollographql/apollo3/cache/normalized/api/CacheHeaders.kt
+++ b/libraries/apollo-normalized-cache-api/src/commonMain/kotlin/com/apollographql/apollo3/cache/normalized/api/CacheHeaders.kt
@@ -29,7 +29,7 @@ class CacheHeaders internal constructor(private val headerMap: Map<String, Strin
   /**
    * @return A [CacheHeaders.Builder] with a copy of this [CacheHeaders] values.
    */
-  @Deprecated("Use newBuilder() instead", ReplaceWith("newBuilder()"))
+  @Deprecated("Use newBuilder() instead", ReplaceWith("newBuilder()"), level = DeprecationLevel.ERROR)
   @ApolloDeprecatedSince(ApolloDeprecatedSince.Version.v3_3_1)
   fun toBuilder(): Builder = newBuilder()
 
diff --git a/libraries/apollo-normalized-cache-api/src/commonMain/kotlin/com/apollographql/apollo3/cache/normalized/api/CacheKey.kt b/libraries/apollo-normalized-cache-api/src/commonMain/kotlin/com/apollographql/apollo3/cache/normalized/api/CacheKey.kt
index 570ba2ab59..d403174b3a 100644
--- a/libraries/apollo-normalized-cache-api/src/commonMain/kotlin/com/apollographql/apollo3/cache/normalized/api/CacheKey.kt
+++ b/libraries/apollo-normalized-cache-api/src/commonMain/kotlin/com/apollographql/apollo3/cache/normalized/api/CacheKey.kt
@@ -75,14 +75,14 @@ class CacheKey constructor(val key: String) {
     /**
      * Helper function to build a cache key from a list of strings
      */
-    @Deprecated("Use the constructor instead", ReplaceWith("CacheKey(typename, values)"))
+    @Deprecated("Use the constructor instead", ReplaceWith("CacheKey(typename, values)"), level = DeprecationLevel.ERROR)
     @ApolloDeprecatedSince(v3_0_0)
     fun from(typename: String, values: List<String>) = CacheKey(typename, values)
 
     /**
      * Helper function to build a cache key from a list of strings
      */
-    @Deprecated("Use the constructor instead", ReplaceWith("CacheKey(typename, values)"))
+    @Deprecated("Use the constructor instead", ReplaceWith("CacheKey(typename, values)"), level = DeprecationLevel.ERROR)
     @ApolloDeprecatedSince(v3_0_0)
     fun from(typename: String, vararg values: String) = CacheKey(typename, values.toList())
   }
diff --git a/libraries/apollo-normalized-cache-api/src/commonMain/kotlin/com/apollographql/apollo3/cache/normalized/api/RecordFieldJsonAdapter.kt b/libraries/apollo-normalized-cache-api/src/commonMain/kotlin/com/apollographql/apollo3/cache/normalized/api/RecordFieldJsonAdapter.kt
index f843fb8e54..51ba540ed1 100644
--- a/libraries/apollo-normalized-cache-api/src/commonMain/kotlin/com/apollographql/apollo3/cache/normalized/api/RecordFieldJsonAdapter.kt
+++ b/libraries/apollo-normalized-cache-api/src/commonMain/kotlin/com/apollographql/apollo3/cache/normalized/api/RecordFieldJsonAdapter.kt
@@ -3,16 +3,16 @@ package com.apollographql.apollo3.cache.normalized.api
 import com.apollographql.apollo3.annotations.ApolloDeprecatedSince
 import com.apollographql.apollo3.cache.normalized.api.internal.JsonRecordSerializer
 
-@Deprecated("Use JsonRecordSerializer instead")
+@Deprecated("Use JsonRecordSerializer instead", level = DeprecationLevel.ERROR)
 @ApolloDeprecatedSince(ApolloDeprecatedSince.Version.v3_3_1)
 object RecordFieldJsonAdapter {
-  @Deprecated("Use JsonRecordSerializer instead", ReplaceWith("JsonRecordSerializer.deserialize(json)"))
+  @Deprecated("Use JsonRecordSerializer instead", ReplaceWith("JsonRecordSerializer.deserialize(json)"), level = DeprecationLevel.ERROR)
   @ApolloDeprecatedSince(ApolloDeprecatedSince.Version.v3_3_1)
   fun fromJson(jsonFieldSource: String): Map<String, Any?> {
     return JsonRecordSerializer.deserialize("", jsonFieldSource).fields
   }
 
-  @Deprecated("Use JsonRecordSerializer instead", ReplaceWith("JsonRecordSerializer.serialize(fields)"))
+  @Deprecated("Use JsonRecordSerializer instead", ReplaceWith("JsonRecordSerializer.serialize(fields)"), level = DeprecationLevel.ERROR)
   @ApolloDeprecatedSince(ApolloDeprecatedSince.Version.v3_3_1)
   fun toJson(fields: Map<String, Any?>): String {
     return JsonRecordSerializer.serialize(Record("", fields))
diff --git a/libraries/apollo-normalized-cache-incubating/src/commonMain/kotlin/com/apollographql/apollo3/cache/normalized/ClientCacheExtensions.kt b/libraries/apollo-normalized-cache-incubating/src/commonMain/kotlin/com/apollographql/apollo3/cache/normalized/ClientCacheExtensions.kt
index 1b6ad789bd..451ecde90f 100644
--- a/libraries/apollo-normalized-cache-incubating/src/commonMain/kotlin/com/apollographql/apollo3/cache/normalized/ClientCacheExtensions.kt
+++ b/libraries/apollo-normalized-cache-incubating/src/commonMain/kotlin/com/apollographql/apollo3/cache/normalized/ClientCacheExtensions.kt
@@ -258,13 +258,13 @@ val ApolloClient.apolloStore: ApolloStore
     } ?: error("no cache configured")
   }
 
-@Deprecated("Used for backward compatibility with 2.x.", ReplaceWith("apolloStore"))
+@Deprecated("Used for backward compatibility with 2.x.", ReplaceWith("apolloStore"), level = DeprecationLevel.ERROR)
 @ApolloDeprecatedSince(v3_0_0)
 fun ApolloClient.apolloStore(): ApolloStore = apolloStore
 
 @Deprecated(
     message = "Use apolloStore directly",
-    replaceWith = ReplaceWith("apolloStore.clearAll()")
+    replaceWith = ReplaceWith("apolloStore.clearAll()"), level = DeprecationLevel.ERROR
 )
 @ApolloDeprecatedSince(v3_0_0)
 fun ApolloClient.clearNormalizedCache() = apolloStore.clearAll()
diff --git a/libraries/apollo-normalized-cache/src/commonMain/kotlin/com/apollographql/apollo3/cache/normalized/ClientCacheExtensions.kt b/libraries/apollo-normalized-cache/src/commonMain/kotlin/com/apollographql/apollo3/cache/normalized/ClientCacheExtensions.kt
index f62ee7db98..d7d3dc1f9b 100644
--- a/libraries/apollo-normalized-cache/src/commonMain/kotlin/com/apollographql/apollo3/cache/normalized/ClientCacheExtensions.kt
+++ b/libraries/apollo-normalized-cache/src/commonMain/kotlin/com/apollographql/apollo3/cache/normalized/ClientCacheExtensions.kt
@@ -234,13 +234,13 @@ val ApolloClient.apolloStore: ApolloStore
     } ?: error("no cache configured")
   }
 
-@Deprecated("Used for backward compatibility with 2.x.", ReplaceWith("apolloStore"))
+@Deprecated("Used for backward compatibility with 2.x.", ReplaceWith("apolloStore"), level = DeprecationLevel.ERROR)
 @ApolloDeprecatedSince(v3_0_0)
 fun ApolloClient.apolloStore(): ApolloStore = apolloStore
 
 @Deprecated(
     message = "Use apolloStore directly",
-    replaceWith = ReplaceWith("apolloStore.clearAll()")
+    replaceWith = ReplaceWith("apolloStore.clearAll()"), level = DeprecationLevel.ERROR
 )
 @ApolloDeprecatedSince(v3_0_0)
 fun ApolloClient.clearNormalizedCache() = apolloStore.clearAll()
diff --git a/libraries/apollo-runtime/src/appleMain/kotlin/com/apollographql/apollo3/network/ws/NSURLSessionWebSocketEngine.kt b/libraries/apollo-runtime/src/appleMain/kotlin/com/apollographql/apollo3/network/ws/NSURLSessionWebSocketEngine.kt
index 1f8879489b..5ef842add6 100644
--- a/libraries/apollo-runtime/src/appleMain/kotlin/com/apollographql/apollo3/network/ws/NSURLSessionWebSocketEngine.kt
+++ b/libraries/apollo-runtime/src/appleMain/kotlin/com/apollographql/apollo3/network/ws/NSURLSessionWebSocketEngine.kt
@@ -99,7 +99,7 @@ actual class DefaultWebSocketEngine(
       ReplaceWith(
           "open(url, headers.map { HttpHeader(it.key, it.value })",
           "com.apollographql.apollo3.api.http.HttpHeader"
-      )
+      ), level = DeprecationLevel.ERROR
   )
   @ApolloDeprecatedSince(v3_2_2)
   override suspend fun open(url: String, headers: Map<String, String>): WebSocketConnection =
diff --git a/libraries/apollo-runtime/src/commonMain/kotlin/com/apollographql/apollo3/ApolloClient.kt b/libraries/apollo-runtime/src/commonMain/kotlin/com/apollographql/apollo3/ApolloClient.kt
index 55f5c8c13a..fdb97b312d 100644
--- a/libraries/apollo-runtime/src/commonMain/kotlin/com/apollographql/apollo3/ApolloClient.kt
+++ b/libraries/apollo-runtime/src/commonMain/kotlin/com/apollographql/apollo3/ApolloClient.kt
@@ -22,7 +22,6 @@ import com.apollographql.apollo3.api.http.HttpMethod
 import com.apollographql.apollo3.api.internal.Version2CustomTypeAdapterToAdapter
 import com.apollographql.apollo3.exception.ApolloHttpException
 import com.apollographql.apollo3.interceptor.ApolloInterceptor
-import com.apollographql.apollo3.interceptor.ApolloInterceptorChain
 import com.apollographql.apollo3.interceptor.AutoPersistedQueryInterceptor
 import com.apollographql.apollo3.interceptor.DefaultInterceptorChain
 import com.apollographql.apollo3.interceptor.NetworkInterceptor
@@ -86,7 +85,7 @@ private constructor(
     return ApolloCall(this, mutation)
   }
 
-  @Deprecated("Used for backward compatibility with 2.x", ReplaceWith("mutation(mutation)"))
+  @Deprecated("Used for backward compatibility with 2.x", ReplaceWith("mutation(mutation)"), level = DeprecationLevel.ERROR)
   @ApolloDeprecatedSince(v3_0_0)
   fun <D : Mutation.Data> mutate(mutation: Mutation<D>): ApolloCall<D> = mutation(mutation)
 
@@ -104,7 +103,7 @@ private constructor(
     throw NotImplementedError()
   }
 
-  @Deprecated("Used for backward compatibility with 2.x", ReplaceWith("subscription(subscription)"))
+  @Deprecated("Used for backward compatibility with 2.x", ReplaceWith("subscription(subscription)"), level = DeprecationLevel.ERROR)
   @ApolloDeprecatedSince(v3_0_0)
   fun <D : Subscription.Data> subscribe(subscription: Subscription<D>): ApolloCall<D> = subscription(subscription)
 
@@ -116,7 +115,7 @@ private constructor(
 
   @Deprecated(
       "Use close() instead or call okio.use { }",
-      replaceWith = ReplaceWith("close()"),
+      replaceWith = ReplaceWith("close()"), level = DeprecationLevel.ERROR
   )
   @ApolloDeprecatedSince(v3_3_1)
   fun dispose() {
@@ -351,7 +350,7 @@ private constructor(
       this.webSocketReopenWhen = webSocketReopenWhen
     }
 
-    @Deprecated("Use webSocketReopenWhen(webSocketReopenWhen: (suspend (Throwable, attempt: Long) -> Boolean))")
+    @Deprecated("Use webSocketReopenWhen(webSocketReopenWhen: (suspend (Throwable, attempt: Long) -> Boolean))", level = DeprecationLevel.ERROR)
     @ApolloDeprecatedSince(v3_0_1)
     fun webSocketReconnectWhen(reconnectWhen: ((Throwable) -> Boolean)?) = apply {
       this.webSocketReopenWhen = reconnectWhen?.let {
@@ -385,11 +384,11 @@ private constructor(
       customScalarAdaptersBuilder.add(customScalarType, customScalarAdapter)
     }
 
-    @Deprecated("Used for backward compatibility with 2.x", ReplaceWith("addCustomScalarAdapter"))
+    @Deprecated("Used for backward compatibility with 2.x", ReplaceWith("addCustomScalarAdapter"), level = DeprecationLevel.ERROR)
     @ApolloDeprecatedSince(v3_0_0)
     fun <T> addCustomTypeAdapter(
         customScalarType: CustomScalarType,
-        @Suppress("DEPRECATION") customTypeAdapter: com.apollographql.apollo3.api.CustomTypeAdapter<T>,
+        @Suppress("DEPRECATION_ERROR") customTypeAdapter: com.apollographql.apollo3.api.CustomTypeAdapter<T>,
     ) = addCustomScalarAdapter(customScalarType, Version2CustomTypeAdapterToAdapter(customTypeAdapter))
 
     fun addInterceptor(interceptor: ApolloInterceptor) = apply {
@@ -405,7 +404,7 @@ private constructor(
       this._interceptors += interceptors
     }
 
-    @Deprecated("Use dispatcher instead", ReplaceWith("dispatcher(requestedDispatcher)"))
+    @Deprecated("Use dispatcher instead", ReplaceWith("dispatcher(requestedDispatcher)"), level = DeprecationLevel.ERROR)
     @ApolloDeprecatedSince(v3_3_3)
     fun requestedDispatcher(requestedDispatcher: CoroutineDispatcher?) = apply {
       dispatcher(requestedDispatcher)
@@ -481,13 +480,13 @@ private constructor(
       canBeBatched(enableByDefault)
     }
 
-    @Deprecated("Used for backward compatibility with 2.x", ReplaceWith("httpMethod(HttpMethod.Get)", "com.apollographql.apollo3.api.http.httpMethod", "com.apollographql.apollo3.api.http.HttpMethod"))
+    @Deprecated("Used for backward compatibility with 2.x", ReplaceWith("httpMethod(HttpMethod.Get)", "com.apollographql.apollo3.api.http.httpMethod", "com.apollographql.apollo3.api.http.HttpMethod"), level = DeprecationLevel.ERROR)
     @ApolloDeprecatedSince(v3_0_0)
     fun useHttpGetMethodForQueries(
         useHttpGetMethodForQueries: Boolean,
     ) = httpMethod(if (useHttpGetMethodForQueries) HttpMethod.Get else HttpMethod.Post)
 
-    @Deprecated("Used for backward compatibility with 2.x. This method throws immediately", ReplaceWith("autoPersistedQueries(httpMethodForHashedQueries = HttpMethod.Get)", "com.apollographql.apollo3.api.http.HttpMethod", "com.apollographql.apollo3.api.http.HttpMethod"))
+    @Deprecated("Used for backward compatibility with 2.x. This method throws immediately", ReplaceWith("autoPersistedQueries(httpMethodForHashedQueries = HttpMethod.Get)", "com.apollographql.apollo3.api.http.HttpMethod", "com.apollographql.apollo3.api.http.HttpMethod"), level = DeprecationLevel.ERROR)
     @ApolloDeprecatedSince(v3_0_0)
     @Suppress("UNUSED_PARAMETER")
     fun useHttpGetMethodForPersistedQueries(
@@ -631,7 +630,7 @@ private constructor(
   }
 
   companion object {
-    @Deprecated("Used for backward compatibility with 2.x", ReplaceWith("ApolloClient.Builder()"))
+    @Deprecated("Used for backward compatibility with 2.x", ReplaceWith("ApolloClient.Builder()"), level = DeprecationLevel.ERROR)
     @ApolloDeprecatedSince(v3_0_0)
     @JvmStatic
     fun builder() = Builder()
diff --git a/libraries/apollo-runtime/src/commonMain/kotlin/com/apollographql/apollo3/network/http/BatchingHttpEngine.kt b/libraries/apollo-runtime/src/commonMain/kotlin/com/apollographql/apollo3/network/http/BatchingHttpEngine.kt
index c3505625a6..fd72e98f91 100644
--- a/libraries/apollo-runtime/src/commonMain/kotlin/com/apollographql/apollo3/network/http/BatchingHttpEngine.kt
+++ b/libraries/apollo-runtime/src/commonMain/kotlin/com/apollographql/apollo3/network/http/BatchingHttpEngine.kt
@@ -6,7 +6,7 @@ import com.apollographql.apollo3.api.http.HttpRequest
 import com.apollographql.apollo3.api.http.HttpResponse
 import kotlin.jvm.JvmOverloads
 
-@Deprecated("Use ApolloClient.Builder.batching instead")
+@Deprecated("Use ApolloClient.Builder.batching instead", level = DeprecationLevel.ERROR)
 @ApolloDeprecatedSince(v3_0_0)
 class BatchingHttpEngine @JvmOverloads constructor(
     val delegate: HttpEngine = DefaultHttpEngine(),
diff --git a/libraries/apollo-runtime/src/commonMain/kotlin/com/apollographql/apollo3/network/http/BearerTokenInterceptor.kt b/libraries/apollo-runtime/src/commonMain/kotlin/com/apollographql/apollo3/network/http/BearerTokenInterceptor.kt
index e3c49a03eb..0dcafa3b12 100644
--- a/libraries/apollo-runtime/src/commonMain/kotlin/com/apollographql/apollo3/network/http/BearerTokenInterceptor.kt
+++ b/libraries/apollo-runtime/src/commonMain/kotlin/com/apollographql/apollo3/network/http/BearerTokenInterceptor.kt
@@ -1,4 +1,4 @@
-@file:Suppress("DEPRECATION")
+@file:Suppress("DEPRECATION_ERROR")
 
 package com.apollographql.apollo3.network.http
 
@@ -10,7 +10,7 @@ import kotlinx.coroutines.sync.withLock
 
 @Deprecated("BearerTokenInterceptor was provided as an example but is too simple for most use cases." +
     "Define your own interceptor or take a look at https://www.apollographql.com/docs/kotlin/advanced/interceptors-http" +
-    " for more details.")
+    " for more details.", level = DeprecationLevel.ERROR)
 @ApolloDeprecatedSince(ApolloDeprecatedSince.Version.v3_2_3)
 class BearerTokenInterceptor(private val tokenProvider: TokenProvider) : HttpInterceptor {
   private val mutex = Mutex()
diff --git a/libraries/apollo-runtime/src/commonMain/kotlin/com/apollographql/apollo3/network/http/TokenProvider.kt b/libraries/apollo-runtime/src/commonMain/kotlin/com/apollographql/apollo3/network/http/TokenProvider.kt
index a7a2c406a0..7b1088114c 100644
--- a/libraries/apollo-runtime/src/commonMain/kotlin/com/apollographql/apollo3/network/http/TokenProvider.kt
+++ b/libraries/apollo-runtime/src/commonMain/kotlin/com/apollographql/apollo3/network/http/TokenProvider.kt
@@ -4,7 +4,7 @@ import com.apollographql.apollo3.annotations.ApolloDeprecatedSince
 
 @Deprecated("BearerTokenInterceptor was provided as an example but is too simple for most use cases." +
     "Define your own interceptor or take a look at https://www.apollographql.com/docs/kotlin/advanced/interceptors-http" +
-    " for more details.")
+    " for more details.", level = DeprecationLevel.ERROR)
 @ApolloDeprecatedSince(ApolloDeprecatedSince.Version.v3_2_3)
 interface TokenProvider {
   suspend fun currentToken(): String
diff --git a/libraries/apollo-runtime/src/commonMain/kotlin/com/apollographql/apollo3/network/ws/GraphQLWsProtocol.kt b/libraries/apollo-runtime/src/commonMain/kotlin/com/apollographql/apollo3/network/ws/GraphQLWsProtocol.kt
index d96523d05a..8b8cb0f890 100644
--- a/libraries/apollo-runtime/src/commonMain/kotlin/com/apollographql/apollo3/network/ws/GraphQLWsProtocol.kt
+++ b/libraries/apollo-runtime/src/commonMain/kotlin/com/apollographql/apollo3/network/ws/GraphQLWsProtocol.kt
@@ -1,7 +1,8 @@
 package com.apollographql.apollo3.network.ws
 
 import com.apollographql.apollo3.annotations.ApolloDeprecatedSince
-import com.apollographql.apollo3.annotations.ApolloDeprecatedSince.Version.*
+import com.apollographql.apollo3.annotations.ApolloDeprecatedSince.Version.v3_2_3
+import com.apollographql.apollo3.annotations.ApolloDeprecatedSince.Version.v3_7_2
 import com.apollographql.apollo3.annotations.ApolloExperimental
 import com.apollographql.apollo3.api.ApolloRequest
 import com.apollographql.apollo3.api.Operation
@@ -46,7 +47,7 @@ class GraphQLWsProtocol internal constructor(
       connectionPayload, pingPayload, pongPayload, connectionAcknowledgeTimeoutMs, pingIntervalMillis, frameType, webSocketConnection, listener, scope, DefaultWebSocketPayloadComposer()
   )
 
-  @Deprecated("Use GraphQLWsProtocol.Factory instead")
+  @Deprecated("Use GraphQLWsProtocol.Factory instead", level = DeprecationLevel.ERROR)
   @ApolloDeprecatedSince(v3_2_3)
   @Suppress("DEPRECATION")
   constructor(
@@ -239,7 +240,7 @@ class GraphQLWsProtocol internal constructor(
     }
 
     @Deprecated("Use the constructor with connectionPayload as a lambda instead",
-        ReplaceWith("Factory({ connectionPayload }, pingIntervalMillis, pingPayload, pongPayload, connectionAcknowledgeTimeoutMs)"))
+        ReplaceWith("Factory({ connectionPayload }, pingIntervalMillis, pingPayload, pongPayload, connectionAcknowledgeTimeoutMs)"), level = DeprecationLevel.ERROR)
     @ApolloDeprecatedSince(v3_2_3)
     constructor(
         connectionPayload: Map<String, Any?>?,
diff --git a/libraries/apollo-runtime/src/commonMain/kotlin/com/apollographql/apollo3/network/ws/WebSocketEngine.kt b/libraries/apollo-runtime/src/commonMain/kotlin/com/apollographql/apollo3/network/ws/WebSocketEngine.kt
index 9ec8431a02..c32f208043 100644
--- a/libraries/apollo-runtime/src/commonMain/kotlin/com/apollographql/apollo3/network/ws/WebSocketEngine.kt
+++ b/libraries/apollo-runtime/src/commonMain/kotlin/com/apollographql/apollo3/network/ws/WebSocketEngine.kt
@@ -25,7 +25,7 @@ interface WebSocketEngine {
       ReplaceWith(
           "open(url, headers.map { HttpHeader(it.key, it.value })",
           "com.apollographql.apollo3.api.http.HttpHeader"
-      )
+      ), level = DeprecationLevel.ERROR
   )
   @ApolloDeprecatedSince(v3_2_2)
   suspend fun open(
diff --git a/libraries/apollo-runtime/src/commonMain/kotlin/com/apollographql/apollo3/network/ws/WebSocketNetworkTransport.kt b/libraries/apollo-runtime/src/commonMain/kotlin/com/apollographql/apollo3/network/ws/WebSocketNetworkTransport.kt
index 683d8b2105..03a57078d7 100644
--- a/libraries/apollo-runtime/src/commonMain/kotlin/com/apollographql/apollo3/network/ws/WebSocketNetworkTransport.kt
+++ b/libraries/apollo-runtime/src/commonMain/kotlin/com/apollographql/apollo3/network/ws/WebSocketNetworkTransport.kt
@@ -386,7 +386,7 @@ private constructor(
     }
 
 
-    @Deprecated("Use reopenWhen(reopenWhen: (suspend (Throwable, attempt: Long) -> Boolean))")
+    @Deprecated("Use reopenWhen(reopenWhen: (suspend (Throwable, attempt: Long) -> Boolean))", level = DeprecationLevel.ERROR)
     @ApolloDeprecatedSince(v3_0_1)
     fun reconnectWhen(reconnectWhen: ((Throwable) -> Boolean)?) = apply {
       this.reopenWhen = reconnectWhen?.let {
diff --git a/libraries/apollo-runtime/src/jsMain/kotlin/com/apollographql/apollo3/network/ws/JsWebSocketEngine.kt b/libraries/apollo-runtime/src/jsMain/kotlin/com/apollographql/apollo3/network/ws/JsWebSocketEngine.kt
index c525bf849a..65cac6c29c 100644
--- a/libraries/apollo-runtime/src/jsMain/kotlin/com/apollographql/apollo3/network/ws/JsWebSocketEngine.kt
+++ b/libraries/apollo-runtime/src/jsMain/kotlin/com/apollographql/apollo3/network/ws/JsWebSocketEngine.kt
@@ -76,7 +76,7 @@ actual class DefaultWebSocketEngine : WebSocketEngine {
       ReplaceWith(
           "open(url, headers.map { HttpHeader(it.key, it.value })",
           "com.apollographql.apollo3.api.http.HttpHeader"
-      )
+      ), level = DeprecationLevel.ERROR
   )
   @ApolloDeprecatedSince(v3_2_2)
   override suspend fun open(url: String, headers: Map<String, String>): WebSocketConnection =
diff --git a/libraries/apollo-runtime/src/jvmMain/kotlin/com/apollographql/apollo3/network/ws/OkHttpWebSocketEngine.kt b/libraries/apollo-runtime/src/jvmMain/kotlin/com/apollographql/apollo3/network/ws/OkHttpWebSocketEngine.kt
index fa1012b543..fc0e8fc575 100644
--- a/libraries/apollo-runtime/src/jvmMain/kotlin/com/apollographql/apollo3/network/ws/OkHttpWebSocketEngine.kt
+++ b/libraries/apollo-runtime/src/jvmMain/kotlin/com/apollographql/apollo3/network/ws/OkHttpWebSocketEngine.kt
@@ -114,7 +114,7 @@ actual class DefaultWebSocketEngine(
       ReplaceWith(
           "open(url, headers.map { HttpHeader(it.key, it.value })",
           "com.apollographql.apollo3.api.http.HttpHeader"
-      )
+      ), level = DeprecationLevel.ERROR
   )
   @ApolloDeprecatedSince(v3_2_2)
   override suspend fun open(url: String, headers: Map<String, String>): WebSocketConnection =


Test patch:
diff --git a/libraries/apollo-gradle-plugin/src/test/kotlin/com/apollographql/apollo3/gradle/test/KotlinDSLTests.kt b/libraries/apollo-gradle-plugin/src/test/kotlin/com/apollographql/apollo3/gradle/test/KotlinDSLTests.kt
index cefd1ba442..b4ada64181 100644
--- a/libraries/apollo-gradle-plugin/src/test/kotlin/com/apollographql/apollo3/gradle/test/KotlinDSLTests.kt
+++ b/libraries/apollo-gradle-plugin/src/test/kotlin/com/apollographql/apollo3/gradle/test/KotlinDSLTests.kt
@@ -36,7 +36,7 @@ class KotlinDSLTests {
       apollo { 
         service("starwars") {
           useSemanticNaming.set(false)
-          customScalarsMapping.set(mapOf("DateTime" to "java.util.Date"))
+          mapScalar("DateTime", "java.util.Date")
           srcDir("src/main/graphql/com/example")
           schemaFile.set(file("src/main/graphql/com/example/schema.json"))
           packageName.set("com.starwars")
diff --git a/libraries/apollo-gradle-plugin/src/test/kotlin/com/apollographql/apollo3/gradle/test/LanguageVersionTests.kt b/libraries/apollo-gradle-plugin/src/test/kotlin/com/apollographql/apollo3/gradle/test/LanguageVersionTests.kt
index 45ed0805e4..450ff570d9 100644
--- a/libraries/apollo-gradle-plugin/src/test/kotlin/com/apollographql/apollo3/gradle/test/LanguageVersionTests.kt
+++ b/libraries/apollo-gradle-plugin/src/test/kotlin/com/apollographql/apollo3/gradle/test/LanguageVersionTests.kt
@@ -8,13 +8,6 @@ import org.junit.Test
 import java.io.File
 
 class LanguageVersionTests {
-  @Test
-  fun `compiling with 1_4 features with Kotlin 1_4 is working`() {
-    withProject(kotlinLanguageVersion = "1.4", apolloLanguageVersion = "1.4") { dir ->
-      TestUtils.executeTaskAndAssertSuccess(":assemble", dir)
-    }
-  }
-
   @Test
   fun `compiling with 1_5 features with Kotlin 1_5 is working`() {
     withProject(kotlinLanguageVersion = "1.5", apolloLanguageVersion = "1.5") { dir ->
diff --git a/libraries/apollo-gradle-plugin/src/test/kotlin/com/apollographql/apollo3/gradle/test/OperationIdGeneratorTests.kt b/libraries/apollo-gradle-plugin/src/test/kotlin/com/apollographql/apollo3/gradle/test/OperationIdGeneratorTests.kt
index 5ec8669b60..5bda97da7d 100644
--- a/libraries/apollo-gradle-plugin/src/test/kotlin/com/apollographql/apollo3/gradle/test/OperationIdGeneratorTests.kt
+++ b/libraries/apollo-gradle-plugin/src/test/kotlin/com/apollographql/apollo3/gradle/test/OperationIdGeneratorTests.kt
@@ -57,8 +57,10 @@ class OperationIdGeneratorTests {
       }
       
       apollo {
-        packageNamesFromFilePaths()
-        operationIdGenerator = new MyIdGenerator()
+        service("service") {
+          packageNamesFromFilePaths()
+          operationIdGenerator = new MyIdGenerator()
+        }
       }
     """.trimIndent()
 
diff --git a/libraries/apollo-gradle-plugin/src/test/kotlin/com/apollographql/apollo3/gradle/test/ServiceTests.kt b/libraries/apollo-gradle-plugin/src/test/kotlin/com/apollographql/apollo3/gradle/test/ServiceTests.kt
index 5d43b217fb..93b37d0be4 100644
--- a/libraries/apollo-gradle-plugin/src/test/kotlin/com/apollographql/apollo3/gradle/test/ServiceTests.kt
+++ b/libraries/apollo-gradle-plugin/src/test/kotlin/com/apollographql/apollo3/gradle/test/ServiceTests.kt
@@ -20,12 +20,12 @@ import java.nio.file.Files
 
 class ServiceTests {
   @Test
-  fun `customScalarsMapping is working`() {
+  fun `mapScalar is working`() {
     withSimpleProject("""
       apollo {
         service("service") {
           packageNamesFromFilePaths()
-          customScalarsMapping = ["DateTime": "java.util.Date"]
+          mapScalar("DateTime", "java.util.Date")
         }
       }
     """.trimIndent()) { dir ->
@@ -35,13 +35,12 @@ class ServiceTests {
   }
 
   @Test
-  fun `customScalarsMapping and mapScalar trigger an error`() {
+  fun `customScalarsMapping triggers an error`() {
     withSimpleProject("""
       apollo {
         service("service") {
           packageNamesFromFilePaths()
           customScalarsMapping = ["DateTime": "java.util.Date"]
-          mapScalar("DateTime", "java.util.Date")
         }
       }
     """.trimIndent()) { dir ->
@@ -49,7 +48,7 @@ class ServiceTests {
         TestUtils.executeTask("generateApolloSources", dir)
         fail("an exception was expected")
       } catch (e: UnexpectedBuildFailure) {
-        Truth.assertThat(e.message).contains("either mapScalar() or customScalarsMapping")
+        Truth.assertThat(e.message).contains("customScalarsMapping is deprecated. Use mapScalar() instead.")
       }
     }
   }
@@ -60,7 +59,7 @@ class ServiceTests {
       apollo {
         service("service") {
           packageNamesFromFilePaths()
-          customScalarsMapping = ["UnknownScalar": "java.util.Date"]
+          mapScalar("UnknownScalar", "java.util.Date")
         }
       }
     """.trimIndent()) { dir ->
@@ -68,7 +67,7 @@ class ServiceTests {
         TestUtils.executeTask("generateApolloSources", dir)
         fail("Registering an unknown scalar should fail")
       } catch (e: UnexpectedBuildFailure) {
-        Truth.assertThat(e.message).contains("unknown custom scalar(s)")
+        Truth.assertThat(e.message).contains("unknown scalar(s)")
       }
     }
   }
@@ -89,39 +88,6 @@ class ServiceTests {
     }
   }
 
-  @Test
-  fun `customScalarsMapping put is working`() {
-    withSimpleProject("""
-      apollo {
-        service("service") {
-          packageNamesFromFilePaths()
-          customScalarsMapping.put("DateTime", "java.util.Date")
-        }
-      }
-    """.trimIndent()) { dir ->
-      TestUtils.executeTask("generateApolloSources", dir)
-      TestUtils.assertFileContains(dir, "service/com/example/type/DateTime.kt", "\"java.util.Date\"")
-    }
-  }
-
-  @Test
-  fun `customScalarsMapping can be applied from a service block`() {
-    withSimpleProject("""
-      apollo {
-        service("other") {
-          packageNamesFromFilePaths()
-        }
-        service("api") {
-          packageNamesFromFilePaths()
-          customScalarsMapping = ["DateTime": "java.util.Date"]
-        }
-      }
-    """.trimIndent()) { dir ->
-      TestUtils.executeTask("generateApolloSources", dir)
-      TestUtils.assertFileContains(dir, "api/com/example/type/DateTime.kt", "\"java.util.Date\"")
-    }
-  }
-
   @Test
   fun `useSemanticNaming defaults to true`() {
     withSimpleProject("""
diff --git a/libraries/apollo-gradle-plugin/src/test/kotlin/com/apollographql/apollo3/gradle/test/UpToDateTests.kt b/libraries/apollo-gradle-plugin/src/test/kotlin/com/apollographql/apollo3/gradle/test/UpToDateTests.kt
index 54909694d5..4095729d63 100644
--- a/libraries/apollo-gradle-plugin/src/test/kotlin/com/apollographql/apollo3/gradle/test/UpToDateTests.kt
+++ b/libraries/apollo-gradle-plugin/src/test/kotlin/com/apollographql/apollo3/gradle/test/UpToDateTests.kt
@@ -47,18 +47,18 @@ class UpToDateTests {
   private fun `adding a custom scalar to the build script re-generates the CustomScalars`(dir: File) {
     File(dir, "build.gradle").replaceInText("packageNamesFromFilePaths()", """
       packageNamesFromFilePaths()
-      customScalarsMapping = ["DateTime": "java.util.Date"]
+      mapScalar("DateTime", "java.util.Date")
     """.trimIndent())
 
     val result = TestUtils.executeTask("generateApolloSources", dir)
 
-    // modifying the customScalarsMapping should cause the task to be out of date
+    // modifying the scalars mapping should cause the task to be out of date
     // and the task should run again
     assertEquals(TaskOutcome.SUCCESS, result.task(":generateApolloSources")!!.outcome)
 
     TestUtils.assertFileContains(dir, "service/com/example/type/DateTime.kt", "\"java.util.Date\"")
 
-    File(dir, "build.gradle").replaceInText("customScalarsMapping = [\"DateTime\": \"java.util.Date\"]", "")
+    File(dir, "build.gradle").replaceInText("mapScalar(\"DateTime\", \"java.util.Date\")", "")
   }
 
   @Test
diff --git a/libraries/apollo-gradle-plugin/testProjects/gradle-min-version/build.gradle.kts b/libraries/apollo-gradle-plugin/testProjects/gradle-min-version/build.gradle.kts
index 7c8b5e9f10..02b634e341 100644
--- a/libraries/apollo-gradle-plugin/testProjects/gradle-min-version/build.gradle.kts
+++ b/libraries/apollo-gradle-plugin/testProjects/gradle-min-version/build.gradle.kts
@@ -25,6 +25,8 @@ repositories {
 }
 
 configure<ApolloExtension> {
-  packageName.set("com.example")
+  service("service") {
+    packageName.set("com.example")
+  }
 }
 
diff --git a/libraries/apollo-gradle-plugin/testProjects/kotlin-plugin-version/build.gradle.kts b/libraries/apollo-gradle-plugin/testProjects/kotlin-plugin-version/build.gradle.kts
index a606616971..f923b0afc0 100644
--- a/libraries/apollo-gradle-plugin/testProjects/kotlin-plugin-version/build.gradle.kts
+++ b/libraries/apollo-gradle-plugin/testProjects/kotlin-plugin-version/build.gradle.kts
@@ -10,6 +10,8 @@ dependencies {
 }
 
 configure<ApolloExtension> {
-  packageName.set("com.example")
+  service("service") {
+    packageName.set("com.example")
+  }
 }
 
diff --git a/libraries/apollo-gradle-plugin/testProjects/multi-modules-diamond/root/build.gradle.kts b/libraries/apollo-gradle-plugin/testProjects/multi-modules-diamond/root/build.gradle.kts
index 27a07d741e..4c292c9b08 100644
--- a/libraries/apollo-gradle-plugin/testProjects/multi-modules-diamond/root/build.gradle.kts
+++ b/libraries/apollo-gradle-plugin/testProjects/multi-modules-diamond/root/build.gradle.kts
@@ -15,6 +15,6 @@ apollo {
   service("service") {
     packageNamesFromFilePaths()
     generateApolloMetadata.set(true)
-    customScalarsMapping.set(mapOf("Date" to "java.util.Date"))
+    mapScalar("Date", "java.util.Date")
   }
 }
diff --git a/libraries/apollo-gradle-plugin/testProjects/multi-modules-duplicates/root/build.gradle.kts b/libraries/apollo-gradle-plugin/testProjects/multi-modules-duplicates/root/build.gradle.kts
index 6d6900147e..1d8b0e6944 100644
--- a/libraries/apollo-gradle-plugin/testProjects/multi-modules-duplicates/root/build.gradle.kts
+++ b/libraries/apollo-gradle-plugin/testProjects/multi-modules-duplicates/root/build.gradle.kts
@@ -16,6 +16,6 @@ apollo {
     alwaysGenerateTypesMatching.set(listOf("Cat"))
     packageNamesFromFilePaths()
     generateApolloMetadata.set(true)
-    customScalarsMapping.set(mapOf("Date" to "java.util.Date"))
+    mapScalar("Date", "java.util.Date")
   }
 }
diff --git a/libraries/apollo-gradle-plugin/testProjects/multi-modules-transitive/root/build.gradle.kts b/libraries/apollo-gradle-plugin/testProjects/multi-modules-transitive/root/build.gradle.kts
index 27a07d741e..4c292c9b08 100644
--- a/libraries/apollo-gradle-plugin/testProjects/multi-modules-transitive/root/build.gradle.kts
+++ b/libraries/apollo-gradle-plugin/testProjects/multi-modules-transitive/root/build.gradle.kts
@@ -15,6 +15,6 @@ apollo {
   service("service") {
     packageNamesFromFilePaths()
     generateApolloMetadata.set(true)
-    customScalarsMapping.set(mapOf("Date" to "java.util.Date"))
+    mapScalar("Date", "java.util.Date")
   }
 }
diff --git a/libraries/apollo-gradle-plugin/testProjects/multi-modules/root/build.gradle.kts b/libraries/apollo-gradle-plugin/testProjects/multi-modules/root/build.gradle.kts
index 27a07d741e..4c292c9b08 100644
--- a/libraries/apollo-gradle-plugin/testProjects/multi-modules/root/build.gradle.kts
+++ b/libraries/apollo-gradle-plugin/testProjects/multi-modules/root/build.gradle.kts
@@ -15,6 +15,6 @@ apollo {
   service("service") {
     packageNamesFromFilePaths()
     generateApolloMetadata.set(true)
-    customScalarsMapping.set(mapOf("Date" to "java.util.Date"))
+    mapScalar("Date", "java.util.Date")
   }
 }
diff --git a/libraries/apollo-testing-support/src/commonMain/kotlin/com/apollographql/apollo3/testing/TestTokenProvider.kt b/libraries/apollo-testing-support/src/commonMain/kotlin/com/apollographql/apollo3/testing/TestTokenProvider.kt
index 5ae3ed0123..0115756c74 100644
--- a/libraries/apollo-testing-support/src/commonMain/kotlin/com/apollographql/apollo3/testing/TestTokenProvider.kt
+++ b/libraries/apollo-testing-support/src/commonMain/kotlin/com/apollographql/apollo3/testing/TestTokenProvider.kt
@@ -1,4 +1,4 @@
-@file:Suppress("DEPRECATION")
+@file:Suppress("DEPRECATION_ERROR")
 
 package com.apollographql.apollo3.testing
 
diff --git a/libraries/apollo-testing-support/src/commonMain/kotlin/com/apollographql/apollo3/testing/runTest.kt b/libraries/apollo-testing-support/src/commonMain/kotlin/com/apollographql/apollo3/testing/runTest.kt
index d5b45cb728..43eb71fae2 100644
--- a/libraries/apollo-testing-support/src/commonMain/kotlin/com/apollographql/apollo3/testing/runTest.kt
+++ b/libraries/apollo-testing-support/src/commonMain/kotlin/com/apollographql/apollo3/testing/runTest.kt
@@ -11,7 +11,7 @@ import kotlin.coroutines.CoroutineContext
 import kotlin.coroutines.EmptyCoroutineContext
 
 @ApolloExperimental
-@Deprecated("Use kotlinx.coroutines.test.runTest from org.jetbrains.kotlinx:kotlinx-coroutines-test instead")
+@Deprecated("Use kotlinx.coroutines.test.runTest from org.jetbrains.kotlinx:kotlinx-coroutines-test instead", level = DeprecationLevel.ERROR)
 @ApolloDeprecatedSince(v3_4_1)
 fun runTest(
     context: CoroutineContext = EmptyCoroutineContext,
diff --git a/tests/defer/src/commonTest/kotlin/test/DeferNormalizedCacheTest.kt b/tests/defer/src/commonTest/kotlin/test/DeferNormalizedCacheTest.kt
index d07d464e13..2e98abdc91 100644
--- a/tests/defer/src/commonTest/kotlin/test/DeferNormalizedCacheTest.kt
+++ b/tests/defer/src/commonTest/kotlin/test/DeferNormalizedCacheTest.kt
@@ -51,7 +51,7 @@ class DeferNormalizedCacheTest {
 
   private suspend fun tearDown() {
     mockServer.stop()
-    apolloClient.dispose()
+    apolloClient.close()
   }
 
   @Test
diff --git a/tests/defer/src/commonTest/kotlin/test/DeferSubscriptionsTest.kt b/tests/defer/src/commonTest/kotlin/test/DeferSubscriptionsTest.kt
index 8a4faab4dc..e00eaf9a01 100644
--- a/tests/defer/src/commonTest/kotlin/test/DeferSubscriptionsTest.kt
+++ b/tests/defer/src/commonTest/kotlin/test/DeferSubscriptionsTest.kt
@@ -29,7 +29,7 @@ class DeferSubscriptionsTest {
   }
 
   private fun tearDown() {
-    apolloClient.dispose()
+    apolloClient.close()
   }
 
   @Test
diff --git a/tests/idling-resource/src/test/java/IdlingResourceTest.kt b/tests/idling-resource/src/test/java/IdlingResourceTest.kt
index cd65e7e359..84b741d763 100644
--- a/tests/idling-resource/src/test/java/IdlingResourceTest.kt
+++ b/tests/idling-resource/src/test/java/IdlingResourceTest.kt
@@ -14,12 +14,7 @@ class IdlingResourceTest {
   @Test
   fun idlingResourceSingleQuery() = runBlocking {
     val mockServer = MockServer()
-    mockServer.enqueue(
-        MockResponse(
-            statusCode = 500,
-            delayMillis = 500,
-        )
-    )
+    mockServer.enqueue(MockResponse.Builder().statusCode(500).delayMillis(500).build())
 
     val idlingResource = ApolloIdlingResource("test")
     val apolloClient = ApolloClient.Builder()
diff --git a/tests/integration-tests/build.gradle.kts b/tests/integration-tests/build.gradle.kts
index d8a2486435..ce5b285416 100644
--- a/tests/integration-tests/build.gradle.kts
+++ b/tests/integration-tests/build.gradle.kts
@@ -64,15 +64,11 @@ fun configureApollo(generateKotlinModels: Boolean) {
             when (it.name) {
               "httpcache" -> {
                 generateOperationOutput.set(true)
-                customScalarsMapping.set(mapOf(
-                    "Date" to "kotlinx.datetime.LocalDate"
-                ))
+                mapScalar("Date", "kotlinx.datetime.LocalDate")
               }
 
               "upload" -> {
-                customScalarsMapping.set(mapOf(
-                    "Upload" to "com.apollographql.apollo3.api.Upload"
-                ))
+                mapScalar("Upload", "com.apollographql.apollo3.api.Upload")
               }
 
               "normalizer" -> {
@@ -87,9 +83,7 @@ fun configureApollo(generateKotlinModels: Boolean) {
               }
 
               "fullstack" -> {
-                customScalarsMapping.set(mapOf(
-                    "Date" to "com.example.MyDate"
-                ))
+                mapScalar("Date", "com.example.MyDate")
               }
             }
 
diff --git a/tests/integration-tests/src/commonTest/kotlin/test/BearerTokenInterceptorTest.kt b/tests/integration-tests/src/commonTest/kotlin/test/BearerTokenInterceptorTest.kt
deleted file mode 100644
index 4e429d2fdf..0000000000
--- a/tests/integration-tests/src/commonTest/kotlin/test/BearerTokenInterceptorTest.kt
+++ /dev/null
@@ -1,67 +0,0 @@
-package test
-
-import com.apollographql.apollo3.ApolloClient
-import com.apollographql.apollo3.exception.ApolloHttpException
-import com.apollographql.apollo3.integration.normalizer.HeroNameQuery
-import com.apollographql.apollo3.mockserver.MockServer
-import com.apollographql.apollo3.mockserver.enqueue
-import com.apollographql.apollo3.network.http.BearerTokenInterceptor
-import com.apollographql.apollo3.network.http.HttpNetworkTransport
-import com.apollographql.apollo3.testing.TestTokenProvider
-import com.apollographql.apollo3.testing.internal.runTest
-import testFixtureToUtf8
-import kotlin.test.Test
-import kotlin.test.assertEquals
-
-class BearerTokenInterceptorTest {
-  private lateinit var mockServer: MockServer
-  private lateinit var apolloClient: ApolloClient
-  private lateinit var tokenProvider: TestTokenProvider
-
-  private var token1 = "token1"
-  private var token2 = "token2"
-
-  private fun setUp() {
-    tokenProvider = TestTokenProvider(token1, token2)
-    mockServer = MockServer()
-    mockServer.enqueue(statusCode = 401)
-    mockServer.enqueue(testFixtureToUtf8("HeroNameResponse.json"))
-  }
-
-  private suspend fun tearDown() {
-    mockServer.stop()
-  }
-
-  @Test
-  fun succeedsWithInterceptor() = runTest(before = { setUp() }, after = { tearDown() }) {
-    apolloClient = ApolloClient.Builder()
-        .networkTransport(
-            HttpNetworkTransport.Builder()
-                .serverUrl(mockServer.url())
-                .interceptors(listOf(BearerTokenInterceptor(tokenProvider)))
-                .build()
-        )
-        .build()
-
-    val response = apolloClient.query(HeroNameQuery()).execute()
-    assertEquals("R2-D2", response.data?.hero?.name)
-
-    assertEquals("Bearer $token1", mockServer.takeRequest().headers["Authorization"])
-    assertEquals("Bearer $token2", mockServer.takeRequest().headers["Authorization"])
-  }
-
-  @Test
-  fun failsWithoutInterceptor() = runTest(before = { setUp() }, after = { tearDown() }) {
-    apolloClient = ApolloClient.Builder()
-        .networkTransport(
-            HttpNetworkTransport.Builder().serverUrl(mockServer.url()).build()
-        )
-        .build()
-
-    try {
-      apolloClient.query(HeroNameQuery()).execute()
-    } catch (e: ApolloHttpException) {
-      assertEquals(401, e.statusCode)
-    }
-  }
-}
diff --git a/tests/integration-tests/src/commonTest/kotlin/test/BodyExtensionsTest.kt b/tests/integration-tests/src/commonTest/kotlin/test/BodyExtensionsTest.kt
index 95d20afc9a..abeb5f4740 100644
--- a/tests/integration-tests/src/commonTest/kotlin/test/BodyExtensionsTest.kt
+++ b/tests/integration-tests/src/commonTest/kotlin/test/BodyExtensionsTest.kt
@@ -69,7 +69,7 @@ class BodyExtensionsTest {
     val asMap = Buffer().write(request.body).jsonReader().readAny() as Map<String, Any>
     assertEquals(asMap["extensions"], "extension value")
 
-    apolloClient.dispose()
+    apolloClient.close()
     mockServer.stop()
   }
 }
diff --git a/tests/integration-tests/src/commonTest/kotlin/test/FetchPolicyTest.kt b/tests/integration-tests/src/commonTest/kotlin/test/FetchPolicyTest.kt
index 95c95f4f20..57e6d0e909 100644
--- a/tests/integration-tests/src/commonTest/kotlin/test/FetchPolicyTest.kt
+++ b/tests/integration-tests/src/commonTest/kotlin/test/FetchPolicyTest.kt
@@ -60,7 +60,7 @@ class FetchPolicyTest {
 
   private suspend fun tearDown() {
     mockServer.stop()
-    apolloClient.dispose()
+    apolloClient.close()
   }
 
   @Test
diff --git a/tests/integration-tests/src/commonTest/kotlin/test/FileUploadTest.kt b/tests/integration-tests/src/commonTest/kotlin/test/FileUploadTest.kt
index 062049dec0..0bb3d882cf 100644
--- a/tests/integration-tests/src/commonTest/kotlin/test/FileUploadTest.kt
+++ b/tests/integration-tests/src/commonTest/kotlin/test/FileUploadTest.kt
@@ -19,7 +19,6 @@ import com.apollographql.apollo3.testing.internal.runTest
 import okio.Buffer
 import kotlin.test.Test
 import kotlin.test.assertEquals
-import kotlin.test.assertFailsWith
 import kotlin.test.assertTrue
 
 class FileUploadTest {
@@ -146,15 +145,6 @@ class FileUploadTest {
     assertMapPart(parts[1], "expectedMapPartBodyNested.json")
     assertOperationsPart(parts[0], "expectedOperationsPartBodyNested.json")
   }
-
-  @Test
-  fun defaultUploadDisallowMultipleWriteTo() {
-    val defaultUpload = DefaultUpload.Builder().content(Buffer()).build()
-    defaultUpload.writeTo(Buffer())
-    assertFailsWith<IllegalStateException> {
-      defaultUpload.writeTo(Buffer())
-    }
-  }
 }
 
 internal class Part(
diff --git a/tests/integration-tests/src/commonTest/kotlin/test/HttpErrorBodyTest.kt b/tests/integration-tests/src/commonTest/kotlin/test/HttpErrorBodyTest.kt
index 4cd83d2fc1..d9d160cf2d 100644
--- a/tests/integration-tests/src/commonTest/kotlin/test/HttpErrorBodyTest.kt
+++ b/tests/integration-tests/src/commonTest/kotlin/test/HttpErrorBodyTest.kt
@@ -33,7 +33,7 @@ class HttpErrorBodyTest {
       assertEquals("Ooops", e.body?.readUtf8())
     }
 
-    apolloClient.dispose()
+    apolloClient.close()
     mockServer.stop()
   }
 }
diff --git a/tests/integration-tests/src/commonTest/kotlin/test/ScalarAdapterTest.kt b/tests/integration-tests/src/commonTest/kotlin/test/ScalarAdapterTest.kt
index 520c005e4f..3ebdadc686 100644
--- a/tests/integration-tests/src/commonTest/kotlin/test/ScalarAdapterTest.kt
+++ b/tests/integration-tests/src/commonTest/kotlin/test/ScalarAdapterTest.kt
@@ -5,8 +5,6 @@ package test
 import com.apollographql.apollo3.ApolloClient
 import com.apollographql.apollo3.api.Adapter
 import com.apollographql.apollo3.api.CustomScalarAdapters
-import com.apollographql.apollo3.api.CustomTypeAdapter
-import com.apollographql.apollo3.api.CustomTypeValue
 import com.apollographql.apollo3.api.json.JsonReader
 import com.apollographql.apollo3.api.json.JsonWriter
 import com.apollographql.apollo3.integration.fullstack.LaunchDetailsByDateQuery
@@ -42,17 +40,6 @@ class ScalarAdapterTest {
     }
   }
 
-  private object MyDateV2CustomTypeAdapter : CustomTypeAdapter<MyDate> {
-    override fun decode(value: CustomTypeValue<*>): MyDate {
-      val elements = value.value.toString().split('-').map { it.toInt() }
-      return MyDate(elements[0], elements[1], elements[2])
-    }
-
-    override fun encode(value: MyDate): CustomTypeValue<*> {
-      return CustomTypeValue.fromRawValue("${value.year}-${value.month}-${value.day}")
-    }
-  }
-
   @Test
   fun regularCustomScalarAdapter() = runTest(before = { setUp() }, after = { tearDown() }) {
     mockServer.enqueue(testFixtureToUtf8("LaunchDetailsByDateResponse.json"))
@@ -69,21 +56,4 @@ class ScalarAdapterTest {
 
     assertEquals(MyDate(1978, 4, 27), response.dataAssertNoErrors.launchByDate?.date)
   }
-
-  @Test
-  fun version2CustomTypeAdapter() = runTest(before = { setUp() }, after = { tearDown() }) {
-    mockServer.enqueue(testFixtureToUtf8("LaunchDetailsByDateResponse.json"))
-
-    val apolloClient = ApolloClient.Builder()
-        .serverUrl(mockServer.url())
-        .addCustomTypeAdapter(Date.type, MyDateV2CustomTypeAdapter)
-        .build()
-
-    val response = apolloClient.query(LaunchDetailsByDateQuery(MyDate(2001, 6, 23))).execute()
-
-    val request = mockServer.takeRequest()
-    assertTrue(request.body.utf8().contains(""""variables":{"date":"2001-6-23"}"""))
-
-    assertEquals(MyDate(1978, 4, 27), response.dataAssertNoErrors.launchByDate?.date)
-  }
 }
diff --git a/tests/integration-tests/src/commonTest/kotlin/test/ThreadTests.kt b/tests/integration-tests/src/commonTest/kotlin/test/ThreadTests.kt
index 4b0df38416..d65355f38d 100644
--- a/tests/integration-tests/src/commonTest/kotlin/test/ThreadTests.kt
+++ b/tests/integration-tests/src/commonTest/kotlin/test/ThreadTests.kt
@@ -112,7 +112,7 @@ class ThreadTests {
 
     apolloClient.query(query).execute()
     apolloClient.query(query).fetchPolicy(FetchPolicy.CacheOnly).execute()
-    apolloClient.dispose()
+    apolloClient.close()
   }
 
   @Test
diff --git a/tests/integration-tests/src/commonTest/kotlin/test/WatcherTest.kt b/tests/integration-tests/src/commonTest/kotlin/test/WatcherTest.kt
index d5fb2ccb43..4f1984c0fa 100644
--- a/tests/integration-tests/src/commonTest/kotlin/test/WatcherTest.kt
+++ b/tests/integration-tests/src/commonTest/kotlin/test/WatcherTest.kt
@@ -553,7 +553,7 @@ class WatcherTest {
     }
 
     mockServer.stop()
-    apolloClient.dispose()
+    apolloClient.close()
   }
 
 
diff --git a/tests/integration-tests/src/commonTest/kotlin/test/batching/QueryBatchingTest.kt b/tests/integration-tests/src/commonTest/kotlin/test/batching/QueryBatchingTest.kt
index 2ba2c3e405..c15f5302af 100644
--- a/tests/integration-tests/src/commonTest/kotlin/test/batching/QueryBatchingTest.kt
+++ b/tests/integration-tests/src/commonTest/kotlin/test/batching/QueryBatchingTest.kt
@@ -33,7 +33,7 @@ class QueryBatchingTest {
   private suspend fun tearDown() {
     mockServer.stop()
     // This is important. JS will hang if the BatchingHttpInterceptor scope is not cancelled
-    apolloClient.dispose()
+    apolloClient.close()
   }
 
   @Test
diff --git a/tests/integration-tests/src/commonTest/kotlin/test/declarativecache/DeclarativeCacheTest.kt b/tests/integration-tests/src/commonTest/kotlin/test/declarativecache/DeclarativeCacheTest.kt
index dc55b448d8..99d57d3ce3 100644
--- a/tests/integration-tests/src/commonTest/kotlin/test/declarativecache/DeclarativeCacheTest.kt
+++ b/tests/integration-tests/src/commonTest/kotlin/test/declarativecache/DeclarativeCacheTest.kt
@@ -101,7 +101,7 @@ class DeclarativeCacheTest {
           @Suppress("UNCHECKED_CAST")
           val isbns = field.resolveArgument("isbns", variables) as? List<String>
           if (isbns != null) {
-            return isbns.map { CacheKey.from(field.type.rawType().name, listOf(it)) }
+            return isbns.map { CacheKey(field.type.rawType().name, listOf(it)) }
           }
         }
 
diff --git a/tests/integration-tests/src/commonTest/kotlin/test/fragment_normalizer/FragmentNormalizerTest.kt b/tests/integration-tests/src/commonTest/kotlin/test/fragment_normalizer/FragmentNormalizerTest.kt
index 8c69fba0d4..a841bdde5c 100644
--- a/tests/integration-tests/src/commonTest/kotlin/test/fragment_normalizer/FragmentNormalizerTest.kt
+++ b/tests/integration-tests/src/commonTest/kotlin/test/fragment_normalizer/FragmentNormalizerTest.kt
@@ -20,7 +20,7 @@ class FragmentNormalizerTest{
   fun test() = runTest {
     val cacheFactory = MemoryCacheFactory()
 
-    val apolloClient = ApolloClient.builder()
+    val apolloClient = ApolloClient.Builder()
         .serverUrl("https:/example.com")
         .normalizedCache(cacheFactory)
         .build()
diff --git a/tests/integration-tests/src/jvmTest/kotlin/test/CacheMissLoggingInterceptorTest.kt b/tests/integration-tests/src/jvmTest/kotlin/test/CacheMissLoggingInterceptorTest.kt
index 875b66cf4b..ef2835e0af 100644
--- a/tests/integration-tests/src/jvmTest/kotlin/test/CacheMissLoggingInterceptorTest.kt
+++ b/tests/integration-tests/src/jvmTest/kotlin/test/CacheMissLoggingInterceptorTest.kt
@@ -60,7 +60,7 @@ class CacheMissLoggingInterceptorTest {
         recordedLogs
     )
     mockServer.stop()
-    apolloClient.dispose()
+    apolloClient.close()
   }
 
   @Test
diff --git a/tests/java-client/build.gradle.kts b/tests/java-client/build.gradle.kts
index fccf272312..1d4f39be74 100644
--- a/tests/java-client/build.gradle.kts
+++ b/tests/java-client/build.gradle.kts
@@ -17,7 +17,7 @@ apollo {
   service("main") {
     srcDir("src/main/graphql/main")
     packageName.set("javatest")
-    generateModelBuilder.set(true)
+    generateModelBuilders.set(true)
     mapScalarToJavaString("LanguageCode")
     mapScalarToJavaObject("Json")
     mapScalarToJavaLong("Long")
@@ -27,19 +27,19 @@ apollo {
   service("graphql-ws") {
     srcDir("src/main/graphql/graphql-ws")
     packageName.set("graphqlws")
-    generateModelBuilder.set(true)
+    generateModelBuilders.set(true)
   }
 
   service("appsync") {
     srcDir("src/main/graphql/appsync")
     packageName.set("appsync")
-    generateModelBuilder.set(true)
+    generateModelBuilders.set(true)
   }
 
   service("batching") {
     srcDir("src/main/graphql/batching")
     packageName.set("batching")
-    generateModelBuilder.set(true)
+    generateModelBuilders.set(true)
   }
 
 }
diff --git a/tests/java-nullability/build.gradle.kts b/tests/java-nullability/build.gradle.kts
index 581f7f1607..fdc4b99426 100644
--- a/tests/java-nullability/build.gradle.kts
+++ b/tests/java-nullability/build.gradle.kts
@@ -18,7 +18,7 @@ apollo {
       connectToJavaSourceSet("main")
     }
     nullableFieldStyle.set("apolloOptional")
-    generateModelBuilder.set(true)
+    generateModelBuilders.set(true)
   }
 
   service("javaOptional") {
@@ -27,7 +27,7 @@ apollo {
       connectToJavaSourceSet("main")
     }
     nullableFieldStyle.set("javaOptional")
-    generateModelBuilder.set(true)
+    generateModelBuilders.set(true)
   }
 
   service("guavaOptional") {
@@ -36,7 +36,7 @@ apollo {
       connectToJavaSourceSet("main")
     }
     nullableFieldStyle.set("guavaOptional")
-    generateModelBuilder.set(true)
+    generateModelBuilders.set(true)
   }
 
   service("jetbrainsAnnotations") {
@@ -45,7 +45,7 @@ apollo {
       connectToJavaSourceSet("main")
     }
     nullableFieldStyle.set("jetbrainsAnnotations")
-    generateModelBuilder.set(true)
+    generateModelBuilders.set(true)
   }
 
   service("androidAnnotations") {
@@ -54,7 +54,7 @@ apollo {
       connectToJavaSourceSet("main")
     }
     nullableFieldStyle.set("androidAnnotations")
-    generateModelBuilder.set(true)
+    generateModelBuilders.set(true)
   }
 
   service("jsr305Annotations") {
@@ -63,7 +63,7 @@ apollo {
       connectToJavaSourceSet("main")
     }
     nullableFieldStyle.set("jsr305Annotations")
-    generateModelBuilder.set(true)
+    generateModelBuilders.set(true)
   }
 
 }
diff --git a/tests/java-tests/build.gradle.kts b/tests/java-tests/build.gradle.kts
index c94900c9d6..cfbac27996 100644
--- a/tests/java-tests/build.gradle.kts
+++ b/tests/java-tests/build.gradle.kts
@@ -18,7 +18,7 @@ dependencies {
 apollo {
   service("service") {
     packageName.set("javatest")
-    generateModelBuilder.set(true)
+    generateModelBuilders.set(true)
     generateDataBuilders.set(true)
     mapScalarToJavaString("LanguageCode")
     mapScalarToJavaObject("Json")
diff --git a/tests/jpms/src/main/java/com/example/app/Main.java b/tests/jpms/src/main/java/com/example/app/Main.java
index bb4f3d39f9..3c8164d165 100644
--- a/tests/jpms/src/main/java/com/example/app/Main.java
+++ b/tests/jpms/src/main/java/com/example/app/Main.java
@@ -13,7 +13,7 @@ public class Main {
     public static void main(String[] args) {
         System.out.println("Hello, World! " + Query.class.getName());
 
-        ApolloClient.Builder apolloClientBuilder = ApolloClient.builder()
+        ApolloClient.Builder apolloClientBuilder = new ApolloClient.Builder()
                 .serverUrl("https://example.com");
 
       NormalizedCache.configureApolloClientBuilder(
@@ -34,6 +34,6 @@ public class Main {
             }
         );
 
-        apolloClient.dispose();
+        apolloClient.close();
     }
 }
diff --git a/tests/models-response-based/build.gradle.kts b/tests/models-response-based/build.gradle.kts
index 8ae5a731f2..68df43a4d6 100644
--- a/tests/models-response-based/build.gradle.kts
+++ b/tests/models-response-based/build.gradle.kts
@@ -31,7 +31,7 @@ apollo {
     srcDir(file("../models-fixtures/graphql"))
     packageName.set("codegen.models")
     generateFragmentImplementations.set(true)
-    customScalarsMapping.put("Date", "kotlin.Long")
+    mapScalar("Date", "kotlin.Long")
     codegenModels.set("responseBased")
     sealedClassesForEnumsMatching.set(setOf("StarshipType"))
   }
diff --git a/tests/multi-module-1/root/build.gradle.kts b/tests/multi-module-1/root/build.gradle.kts
index 97bafbf524..873633c004 100644
--- a/tests/multi-module-1/root/build.gradle.kts
+++ b/tests/multi-module-1/root/build.gradle.kts
@@ -12,6 +12,6 @@ apollo {
   service("service") {
     packageName.set("multimodule1.root")
     generateApolloMetadata.set(true)
-    customScalarsMapping.set(mapOf("Long" to "kotlin.Long"))
+    mapScalar("Long", "kotlin.Long")
   }
 }
diff --git a/tests/no-query-document/src/test/kotlin/test/NoQueryDocumentTest.kt b/tests/no-query-document/src/test/kotlin/test/NoQueryDocumentTest.kt
index 66ef715d29..cdc91d845d 100644
--- a/tests/no-query-document/src/test/kotlin/test/NoQueryDocumentTest.kt
+++ b/tests/no-query-document/src/test/kotlin/test/NoQueryDocumentTest.kt
@@ -75,7 +75,7 @@ class NoQueryDocumentTest {
     val asMap = Buffer().write(request.body).jsonReader().readAny() as Map<String, Any>
     assertEquals(asMap["query"], queryDocument)
 
-    apolloClient.dispose()
+    apolloClient.close()
     mockServer.stop()
   }
 }
diff --git a/tests/scalar-adapters/src/test/kotlin/test/CustomScalarTest.kt b/tests/scalar-adapters/src/test/kotlin/test/CustomScalarTest.kt
index 7aaf50bab0..83e589b583 100644
--- a/tests/scalar-adapters/src/test/kotlin/test/CustomScalarTest.kt
+++ b/tests/scalar-adapters/src/test/kotlin/test/CustomScalarTest.kt
@@ -1,8 +1,12 @@
 package test
 
 import com.apollographql.apollo3.ApolloClient
-import com.apollographql.apollo3.api.CustomTypeAdapter
-import com.apollographql.apollo3.api.CustomTypeValue
+import com.apollographql.apollo3.api.Adapter
+import com.apollographql.apollo3.api.AnyAdapter
+import com.apollographql.apollo3.api.CustomScalarAdapters
+import com.apollographql.apollo3.api.json.JsonReader
+import com.apollographql.apollo3.api.json.JsonWriter
+import com.apollographql.apollo3.api.json.writeObject
 import com.apollographql.apollo3.mockserver.MockServer
 import com.apollographql.apollo3.mockserver.enqueue
 import com.apollographql.apollo3.testing.internal.runTest
@@ -128,29 +132,25 @@ class CustomScalarTest {
       }
     """.trimIndent())
 
-    val customTypeAdapter = object : CustomTypeAdapter<Address> {
-      override fun decode(value: CustomTypeValue<*>): Address {
-        check(value is CustomTypeValue.GraphQLJsonObject)
+    val customTypeAdapter = object : Adapter<Address> {
+      override fun fromJson(reader: JsonReader, customScalarAdapters: CustomScalarAdapters): Address {
+        val map = AnyAdapter.fromJson(reader, customScalarAdapters) as Map<String, Any?>
 
-        /**
-         * XXX: For consistency, a [CustomTypeValue.GraphQLJsonObject] should contain `GraphQLFoo`
-         * but in 2.x it contains primitive instead so keep that behaviour
-         */
-        val street = value.value["street"] as String
-        val number = value.value["number"] as Int
-        return Address(street, number)
+        return Address(map.get("street") as String, map.get("number") as Int)
       }
 
-      override fun encode(value: Address): CustomTypeValue<*> {
-        return CustomTypeValue.GraphQLJsonObject(mapOf(
-            "street" to value.street,
-            "number" to value.number
-        ))
+      override fun toJson(writer: JsonWriter, customScalarAdapters: CustomScalarAdapters, value: Address) {
+        writer.writeObject {
+          name("street")
+          value(value.street)
+          name("number")
+          value(value.number)
+        }
       }
     }
     val data = ApolloClient.Builder()
         .serverUrl(serverUrl = server.url())
-        .addCustomTypeAdapter(custom.scalars.type.Address.type, customTypeAdapter)
+        .addCustomScalarAdapter(custom.scalars.type.Address.type, customTypeAdapter)
         .build()
         .query(AddressQuery())
         .execute()
diff --git a/tests/termination/src/main/kotlin/termination/Main.kt b/tests/termination/src/main/kotlin/termination/Main.kt
index 8f5130b527..82c0857991 100644
--- a/tests/termination/src/main/kotlin/termination/Main.kt
+++ b/tests/termination/src/main/kotlin/termination/Main.kt
@@ -20,7 +20,7 @@ fun main() = runBlocking {
     e.printStackTrace()
   }
 
-  apolloClient.dispose()
+  apolloClient.close()
   okHttpClient.dispatcher.executorService.shutdown()
   okHttpClient.connectionPool.evictAll()
 
diff --git a/tests/test-network-transport/src/test/kotlin/testnetworktransport/CustomTestNetworkTransportHandlerTest.kt b/tests/test-network-transport/src/test/kotlin/testnetworktransport/CustomTestNetworkTransportHandlerTest.kt
index 670eef11f9..2ec53501af 100644
--- a/tests/test-network-transport/src/test/kotlin/testnetworktransport/CustomTestNetworkTransportHandlerTest.kt
+++ b/tests/test-network-transport/src/test/kotlin/testnetworktransport/CustomTestNetworkTransportHandlerTest.kt
@@ -28,7 +28,7 @@ class CustomTestNetworkTransportHandlerTest {
   }
 
   private fun tearDown() {
-    apolloClient.dispose()
+    apolloClient.close()
   }
 
   private class CustomTestNetworkTransport : NetworkTransport {
diff --git a/tests/websockets/src/commonTest/kotlin/FullStackTest.kt b/tests/websockets/src/commonTest/kotlin/FullStackTest.kt
index 70681003f8..d0efeb0f3f 100644
--- a/tests/websockets/src/commonTest/kotlin/FullStackTest.kt
+++ b/tests/websockets/src/commonTest/kotlin/FullStackTest.kt
@@ -21,6 +21,6 @@ class FullStackTest {
           println("trips booked: ${it.data?.tripsBooked}")
         }
 
-    apolloClient.dispose()
+    apolloClient.close()
   }
 }
diff --git a/tests/websockets/src/jvmTest/kotlin/WebSocketErrorsTest.kt b/tests/websockets/src/jvmTest/kotlin/WebSocketErrorsTest.kt
index 4c65682968..01cede35f1 100644
--- a/tests/websockets/src/jvmTest/kotlin/WebSocketErrorsTest.kt
+++ b/tests/websockets/src/jvmTest/kotlin/WebSocketErrorsTest.kt
@@ -58,7 +58,7 @@ class WebSocketErrorsTest {
           assertTrue(error.cause?.message?.contains("Connection error") == true)
         }
 
-    apolloClient.dispose()
+    apolloClient.close()
   }
 
   @Test
@@ -82,7 +82,7 @@ class WebSocketErrorsTest {
           assertTrue(error.cause?.message?.contains("WebSocket Closed code='3666'") == true)
         }
 
-    apolloClient.dispose()
+    apolloClient.close()
   }
 
   @Test
@@ -148,7 +148,7 @@ class WebSocketErrorsTest {
     assertIs<ApolloWebSocketClosedException>(exception)
     assertEquals(1011, (exception as ApolloWebSocketClosedException).code)
 
-    apolloClient.dispose()
+    apolloClient.close()
   }
 
   @Test
@@ -168,7 +168,7 @@ class WebSocketErrorsTest {
         }
 
     println("dispose")
-    apolloClient.dispose()
+    apolloClient.close()
 
     apolloClient = ApolloClient.Builder()
         .httpServerUrl(sampleServer.graphqlUrl())
@@ -214,7 +214,7 @@ class WebSocketErrorsTest {
           assertEquals(1011, cause.code)
         }
 
-    apolloClient.dispose()
+    apolloClient.close()
   }
 
   @Test
@@ -251,7 +251,7 @@ class WebSocketErrorsTest {
           awaitComplete()
         }
 
-    apolloClient.dispose()
+    apolloClient.close()
 
     // connectionInitCount is 2 since we returned true in webSocketReopenWhen
     assertEquals(2, connectionInitCount)