diff --git a/.idea/runConfigurations/CodegenTest.xml b/.idea/runConfigurations/CodegenTest.xml index d3af27a85f2..fbe6d34c4a4 100644 --- a/.idea/runConfigurations/CodegenTest.xml +++ b/.idea/runConfigurations/CodegenTest.xml @@ -3,7 +3,7 @@ diff --git a/build-logic/src/main/kotlin/Testing.kt b/build-logic/src/main/kotlin/Testing.kt index daf452f7caf..fcac18f4d7f 100644 --- a/build-logic/src/main/kotlin/Testing.kt +++ b/build-logic/src/main/kotlin/Testing.kt @@ -8,10 +8,9 @@ import org.gradle.api.tasks.testing.logging.TestLogEvent fun Project.configureTesting() { tasks.withType(Test::class.java) { - systemProperty("updateTestFixtures", System.getProperty("updateTestFixtures")) - systemProperty("testFilter", System.getProperty("testFilter")) - systemProperty("codegenModels", System.getProperty("codegenModels")) - + forwardEnv("updateTestFixtures") + forwardEnv("testFilter") + forwardEnv("codegenModels") } pluginManager.withPlugin("org.jetbrains.kotlin.jvm") { @@ -35,6 +34,16 @@ fun Project.configureTesting() { } } +/** + * forwards an environment variable to a test task and mark it as input + */ +fun Test.forwardEnv(name: String) { + System.getenv(name)?.let { value -> + environment(name, value) + inputs.property(name, value) + } +} + // See https://github.com/gradle/gradle/issues/23456 fun Test.addRelativeInput(name: String, dirPath: Any) { this.inputs.dir(dirPath).withPropertyName(name).withPathSensitivity(PathSensitivity.RELATIVE) diff --git a/libraries/apollo-api/api/apollo-api.api b/libraries/apollo-api/api/apollo-api.api index a25122b681d..d7fa9c75356 100644 --- a/libraries/apollo-api/api/apollo-api.api +++ b/libraries/apollo-api/api/apollo-api.api @@ -22,6 +22,9 @@ public final class com/apollographql/apollo3/api/Adapters { public static final field NullableStringAdapter Lcom/apollographql/apollo3/api/NullableAdapter; public static final field StringAdapter Lcom/apollographql/apollo3/api/Adapter; public static final field UploadAdapter Lcom/apollographql/apollo3/api/Adapter; + public static final fun -catchToNull (Lcom/apollographql/apollo3/api/Adapter;)Lcom/apollographql/apollo3/api/Adapter; + public static final fun -catchToResult (Lcom/apollographql/apollo3/api/Adapter;)Lcom/apollographql/apollo3/api/Adapter; + public static final fun -errorAware (Lcom/apollographql/apollo3/api/Adapter;)Lcom/apollographql/apollo3/api/Adapter; public static final fun -list (Lcom/apollographql/apollo3/api/Adapter;)Lcom/apollographql/apollo3/api/ListAdapter; public static final fun -nullable (Lcom/apollographql/apollo3/api/Adapter;)Lcom/apollographql/apollo3/api/NullableAdapter; public static final fun -obj (Lcom/apollographql/apollo3/api/Adapter;Z)Lcom/apollographql/apollo3/api/ObjectAdapter; @@ -382,8 +385,9 @@ public final class com/apollographql/apollo3/api/CustomScalarAdapters : com/apol public static final field Key Lcom/apollographql/apollo3/api/CustomScalarAdapters$Key; public static final field PassThrough Lcom/apollographql/apollo3/api/CustomScalarAdapters; public final field deferredFragmentIdentifiers Ljava/util/Set; + public final field errors Ljava/util/List; public final field falseVariables Ljava/util/Set; - public synthetic fun (Ljava/util/Map;Ljava/util/Set;Ljava/util/Set;ZLkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (Ljava/util/Map;Ljava/util/Set;Ljava/util/Set;Ljava/util/List;ZLkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun adapterFor (Ljava/lang/String;)Lcom/apollographql/apollo3/api/Adapter; public fun getKey ()Lcom/apollographql/apollo3/api/ExecutionContext$Key; public final fun newBuilder ()Lcom/apollographql/apollo3/api/CustomScalarAdapters$Builder; @@ -398,6 +402,7 @@ public final class com/apollographql/apollo3/api/CustomScalarAdapters$Builder { public final fun build ()Lcom/apollographql/apollo3/api/CustomScalarAdapters; public final fun clear ()V public final fun deferredFragmentIdentifiers (Ljava/util/Set;)Lcom/apollographql/apollo3/api/CustomScalarAdapters$Builder; + public final fun errors (Ljava/util/List;)Lcom/apollographql/apollo3/api/CustomScalarAdapters$Builder; public final fun falseVariables (Ljava/util/Set;)Lcom/apollographql/apollo3/api/CustomScalarAdapters$Builder; } @@ -494,6 +499,7 @@ public final class com/apollographql/apollo3/api/Error$Location { public abstract interface class com/apollographql/apollo3/api/Executable { public abstract fun adapter ()Lcom/apollographql/apollo3/api/Adapter; + public abstract fun getIgnoreErrors ()Z public abstract fun rootField ()Lcom/apollographql/apollo3/api/CompiledField; public abstract fun serializeVariables (Lcom/apollographql/apollo3/api/json/JsonWriter;Lcom/apollographql/apollo3/api/CustomScalarAdapters;Z)V } @@ -512,7 +518,8 @@ public final class com/apollographql/apollo3/api/Executables { public static final fun parseData (Lcom/apollographql/apollo3/api/Executable;Lcom/apollographql/apollo3/api/json/JsonReader;Lcom/apollographql/apollo3/api/CustomScalarAdapters;)Lcom/apollographql/apollo3/api/Executable$Data; public static final fun parseData (Lcom/apollographql/apollo3/api/Executable;Lcom/apollographql/apollo3/api/json/JsonReader;Lcom/apollographql/apollo3/api/CustomScalarAdapters;Ljava/util/Set;)Lcom/apollographql/apollo3/api/Executable$Data; public static final fun parseData (Lcom/apollographql/apollo3/api/Executable;Lcom/apollographql/apollo3/api/json/JsonReader;Lcom/apollographql/apollo3/api/CustomScalarAdapters;Ljava/util/Set;Ljava/util/Set;)Lcom/apollographql/apollo3/api/Executable$Data; - public static synthetic fun parseData$default (Lcom/apollographql/apollo3/api/Executable;Lcom/apollographql/apollo3/api/json/JsonReader;Lcom/apollographql/apollo3/api/CustomScalarAdapters;Ljava/util/Set;Ljava/util/Set;ILjava/lang/Object;)Lcom/apollographql/apollo3/api/Executable$Data; + public static final fun parseData (Lcom/apollographql/apollo3/api/Executable;Lcom/apollographql/apollo3/api/json/JsonReader;Lcom/apollographql/apollo3/api/CustomScalarAdapters;Ljava/util/Set;Ljava/util/Set;Ljava/util/List;)Lcom/apollographql/apollo3/api/Executable$Data; + public static synthetic fun parseData$default (Lcom/apollographql/apollo3/api/Executable;Lcom/apollographql/apollo3/api/json/JsonReader;Lcom/apollographql/apollo3/api/CustomScalarAdapters;Ljava/util/Set;Ljava/util/Set;Ljava/util/List;ILjava/lang/Object;)Lcom/apollographql/apollo3/api/Executable$Data; public static final fun variables (Lcom/apollographql/apollo3/api/Executable;Lcom/apollographql/apollo3/api/CustomScalarAdapters;)Lcom/apollographql/apollo3/api/Executable$Variables; public static final fun variablesJson (Lcom/apollographql/apollo3/api/Executable;Lcom/apollographql/apollo3/api/CustomScalarAdapters;)Ljava/lang/String; } @@ -574,6 +581,28 @@ public final class com/apollographql/apollo3/api/FakeResolverKt { public static final fun buildData (Lcom/apollographql/apollo3/api/BuilderFactory;Lkotlin/jvm/functions/Function1;Lcom/apollographql/apollo3/api/Adapter;Ljava/util/List;Ljava/lang/String;Lcom/apollographql/apollo3/api/FakeResolver;Lcom/apollographql/apollo3/api/CustomScalarAdapters;)Ljava/lang/Object; } +public abstract interface class com/apollographql/apollo3/api/FieldResult { +} + +public final class com/apollographql/apollo3/api/FieldResult$Failure : com/apollographql/apollo3/api/FieldResult { + public fun (Lcom/apollographql/apollo3/exception/ApolloException;)V + public final fun getException ()Lcom/apollographql/apollo3/exception/ApolloException; +} + +public final class com/apollographql/apollo3/api/FieldResult$Success : com/apollographql/apollo3/api/FieldResult { + public fun (Ljava/lang/Object;)V + public final fun getValue ()Ljava/lang/Object; +} + +public final class com/apollographql/apollo3/api/FieldResultKt { + public static final fun exceptionOrNull (Lcom/apollographql/apollo3/api/FieldResult;)Ljava/lang/Exception; + public static final fun getOrElse (Lcom/apollographql/apollo3/api/FieldResult;Ljava/lang/Object;)Ljava/lang/Object; + public static final fun getOrNull (Lcom/apollographql/apollo3/api/FieldResult;)Ljava/lang/Object; + public static final fun getOrThrow (Lcom/apollographql/apollo3/api/FieldResult;)Ljava/lang/Object; + public static final fun graphQLErrorOrNull (Lcom/apollographql/apollo3/api/FieldResult;)Lcom/apollographql/apollo3/api/Error; + public static final fun isSuccess (Lcom/apollographql/apollo3/api/FieldResult;)Z +} + public final class com/apollographql/apollo3/api/FileUpload { public static final fun toUpload (Ljava/io/File;Ljava/lang/String;)Lcom/apollographql/apollo3/api/DefaultUpload; } @@ -1174,7 +1203,9 @@ public final class com/apollographql/apollo3/exception/ApolloExceptionHandlerKt } public final class com/apollographql/apollo3/exception/ApolloGraphQLException : com/apollographql/apollo3/exception/ApolloException { + public fun (Lcom/apollographql/apollo3/api/Error;)V public fun (Ljava/util/List;)V + public final fun getError ()Lcom/apollographql/apollo3/api/Error; public final fun getErrors ()Ljava/util/List; } diff --git a/libraries/apollo-api/src/commonMain/kotlin/com/apollographql/apollo3/api/Adapters.kt b/libraries/apollo-api/src/commonMain/kotlin/com/apollographql/apollo3/api/Adapters.kt index d1e7f168481..9813775b440 100644 --- a/libraries/apollo-api/src/commonMain/kotlin/com/apollographql/apollo3/api/Adapters.kt +++ b/libraries/apollo-api/src/commonMain/kotlin/com/apollographql/apollo3/api/Adapters.kt @@ -11,6 +11,8 @@ import com.apollographql.apollo3.api.json.MapJsonWriter import com.apollographql.apollo3.api.json.buildJsonString import com.apollographql.apollo3.api.json.readAny import com.apollographql.apollo3.api.json.writeAny +import com.apollographql.apollo3.exception.ApolloException +import com.apollographql.apollo3.exception.ApolloGraphQLException import kotlin.jvm.JvmField import kotlin.jvm.JvmName import kotlin.jvm.JvmOverloads @@ -80,7 +82,7 @@ class OptionalAdapter(private val wrappedAdapter: Adapter) : Adapter(private val wrappedAdapter: Adapter) : Adapter } } -@JvmName("-obj") -fun Adapter.obj(buffered: Boolean = false) = ObjectAdapter(this, buffered) - @JvmField val StringAdapter = object : Adapter { override fun fromJson(reader: JsonReader, customScalarAdapters: CustomScalarAdapters): String { @@ -283,12 +282,6 @@ val ApolloOptionalBooleanAdapter = ApolloOptionalAdapter(BooleanAdapter) @JvmField val ApolloOptionalAnyAdapter = ApolloOptionalAdapter(AnyAdapter) -@JvmName("-nullable") -fun Adapter.nullable() = NullableAdapter(this) - -@JvmName("-list") -fun Adapter.list() = ListAdapter(this) - /** * Note that Arrays require their type to be known at compile time, so we construct an anonymous object with reference to * function with reified type parameters as a workaround. @@ -297,7 +290,11 @@ fun Adapter.list() = ListAdapter(this) @JvmName("-array") inline fun Adapter.array() = object : Adapter> { - private inline fun arrayFromJson(wrappedAdapter: Adapter, reader: JsonReader, customScalarAdapters: CustomScalarAdapters): Array { + private inline fun arrayFromJson( + wrappedAdapter: Adapter, + reader: JsonReader, + customScalarAdapters: CustomScalarAdapters, + ): Array { reader.beginArray() val list = mutableListOf() while (reader.hasNext()) { @@ -311,7 +308,7 @@ inline fun Adapter.array() = object : Adapter> { wrappedAdapter: Adapter, writer: JsonWriter, customScalarAdapters: CustomScalarAdapters, - value: Array + value: Array, ) { writer.beginArray() value.forEach { @@ -363,14 +360,14 @@ class ObjectAdapter( } } - override fun toJson(writer: JsonWriter, customScalarAdapters: CustomScalarAdapters, value: T, ) { + override fun toJson(writer: JsonWriter, customScalarAdapters: CustomScalarAdapters, value: T) { if (buffered && writer !is MapJsonWriter) { /** * Convert to a Map first */ val mapWriter = MapJsonWriter() mapWriter.beginObject() - wrappedAdapter.toJson(mapWriter, customScalarAdapters, value, ) + wrappedAdapter.toJson(mapWriter, customScalarAdapters, value) mapWriter.endObject() /** @@ -379,8 +376,80 @@ class ObjectAdapter( writer.writeAny(mapWriter.root()!!) } else { writer.beginObject() - wrappedAdapter.toJson(writer, customScalarAdapters, value,) + wrappedAdapter.toJson(writer, customScalarAdapters, value) writer.endObject() } } -} \ No newline at end of file +} + +private class ErrorAwareAdapter(private val wrappedAdapter: Adapter) : Adapter { + override fun fromJson(reader: JsonReader, customScalarAdapters: CustomScalarAdapters): T { + if (reader.peek() == JsonReader.Token.NULL) { + val error = customScalarAdapters.firstErrorStartingWith(reader.getPath()) + if (error != null) { + reader.skipValue() + throw ApolloGraphQLException(error) + } + } + + return wrappedAdapter.fromJson(reader, customScalarAdapters) + } + + override fun toJson(writer: JsonWriter, customScalarAdapters: CustomScalarAdapters, value: T) { + wrappedAdapter.toJson(writer, customScalarAdapters, value) + } +} + +private class CatchToResultAdapter(private val wrappedAdapter: Adapter) : Adapter> { + override fun fromJson(reader: JsonReader, customScalarAdapters: CustomScalarAdapters): FieldResult { + return try { + FieldResult.Success(wrappedAdapter.fromJson(reader, customScalarAdapters)) + } catch (e: ApolloException) { + FieldResult.Failure(e) + } + } + + override fun toJson(writer: JsonWriter, customScalarAdapters: CustomScalarAdapters, value: FieldResult) { + when (value) { + is FieldResult.Success -> wrappedAdapter.toJson(writer, customScalarAdapters, value.getOrThrow()) + else -> Unit // ignore errors + } + } +} + +private class CatchToNullAdapter(private val wrappedAdapter: Adapter) : Adapter<@JvmSuppressWildcards T?> { + override fun fromJson(reader: JsonReader, customScalarAdapters: CustomScalarAdapters): T? { + return try { + wrappedAdapter.fromJson(reader, customScalarAdapters) + } catch (e: ApolloException) { + null + } + } + + override fun toJson(writer: JsonWriter, customScalarAdapters: CustomScalarAdapters, value: T?) { + if (value == null) { + // XXX: this potentially writes null instead of an error + writer.nullValue() + } else { + wrappedAdapter.toJson(writer, customScalarAdapters, value) + } + } +} + +@JvmName("-nullable") +fun Adapter.nullable() = NullableAdapter(this) + +@JvmName("-list") +fun Adapter.list() = ListAdapter(this) + +@JvmName("-obj") +fun Adapter.obj(buffered: Boolean = false) = ObjectAdapter(this, buffered) + +@JvmName("-catchToResult") +fun Adapter.catchToResult(): Adapter> = CatchToResultAdapter(this) + +@JvmName("-errorAware") +fun Adapter.errorAware(): Adapter = ErrorAwareAdapter(this) + +@JvmName("-catchToNull") +fun Adapter.catchToNull(): Adapter = CatchToNullAdapter(this) \ No newline at end of file diff --git a/libraries/apollo-api/src/commonMain/kotlin/com/apollographql/apollo3/api/Assertions.kt b/libraries/apollo-api/src/commonMain/kotlin/com/apollographql/apollo3/api/Assertions.kt index dfae5835e49..ca9f0351306 100644 --- a/libraries/apollo-api/src/commonMain/kotlin/com/apollographql/apollo3/api/Assertions.kt +++ b/libraries/apollo-api/src/commonMain/kotlin/com/apollographql/apollo3/api/Assertions.kt @@ -13,7 +13,7 @@ import kotlin.jvm.JvmName */ fun checkFieldNotMissing(value: Any?, name: String) { if (value == null) { - throw DefaultApolloException("Field '$name' is missing") + throw DefaultApolloException("Field '$name' is missing or null") } } @@ -35,5 +35,5 @@ fun assertOneOf(vararg args: Optional<*>) { * Helper function for the Kotlin codegen */ fun missingField(jsonReader: JsonReader, name: String): Nothing { - throw DefaultApolloException("Field '$name' is missing at path ${jsonReader.getPath()}") + throw DefaultApolloException("Field '$name' is missing or null at path ${jsonReader.getPath()}") } 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 bc7c69467c1..b2e42b50301 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 @@ -22,6 +22,12 @@ class CustomScalarAdapters private constructor( */ @JvmField val deferredFragmentIdentifiers: Set?, + /** + * Errors to use with @catch + */ + @JvmField + val errors: List?, + private val unsafe: Boolean, ) : ExecutionContext.Element { @@ -97,6 +103,26 @@ class CustomScalarAdapters private constructor( val PassThrough = Builder().unsafe(true).build() } + @ApolloExperimental + fun firstErrorStartingWith(path: List): Error? { + return errors?.firstOrNull { + it.path?.startsWith(path) == true + } + } + + private fun List.startsWith(responsePath: List): Boolean { + // start at 1 to drop the `data.` + for (i in 1.until(responsePath.size)) { + if (i - 1 >= this.size) { + return false + } + if (responsePath[i] != this[i - 1]) { + return false + } + } + return true + } + fun newBuilder(): Builder { return Builder().addAll(this) .falseVariables(falseVariables) @@ -108,6 +134,7 @@ class CustomScalarAdapters private constructor( private var unsafe = false private var falseVariables: Set? = null private var deferredFragmentIdentifiers: Set? = null + private var errors: List? = null fun falseVariables(falseVariables: Set?) = apply { this.falseVariables = falseVariables @@ -117,6 +144,10 @@ class CustomScalarAdapters private constructor( this.deferredFragmentIdentifiers = deferredFragmentIdentifiers } + fun errors(errors: List?) = apply { + this.errors = errors + } + fun add( name: String, adapter: Adapter, @@ -148,8 +179,9 @@ class CustomScalarAdapters private constructor( fun build(): CustomScalarAdapters { return CustomScalarAdapters( adaptersMap, - falseVariables , + falseVariables, deferredFragmentIdentifiers, + errors, unsafe, ) } diff --git a/libraries/apollo-api/src/commonMain/kotlin/com/apollographql/apollo3/api/Executable.kt b/libraries/apollo-api/src/commonMain/kotlin/com/apollographql/apollo3/api/Executable.kt index 93e67803d12..104094c1766 100644 --- a/libraries/apollo-api/src/commonMain/kotlin/com/apollographql/apollo3/api/Executable.kt +++ b/libraries/apollo-api/src/commonMain/kotlin/com/apollographql/apollo3/api/Executable.kt @@ -30,6 +30,12 @@ interface Executable { */ fun rootField(): CompiledField + /** + * A flag to disable error checking for the whole operation. + * Used for backward compatibility. + */ + val ignoreErrors: Boolean + /** * Marker interface for generated models */ diff --git a/libraries/apollo-api/src/commonMain/kotlin/com/apollographql/apollo3/api/Executables.kt b/libraries/apollo-api/src/commonMain/kotlin/com/apollographql/apollo3/api/Executables.kt index 022183f62db..0a4e3606961 100644 --- a/libraries/apollo-api/src/commonMain/kotlin/com/apollographql/apollo3/api/Executables.kt +++ b/libraries/apollo-api/src/commonMain/kotlin/com/apollographql/apollo3/api/Executables.kt @@ -72,10 +72,12 @@ fun Executable.parseData( customScalarAdapters: CustomScalarAdapters = CustomScalarAdapters.Empty, falseVariables: Set? = null, deferredFragmentIds: Set? = null, + errors: List? = null ): D? { val customScalarAdapters1 = customScalarAdapters.newBuilder() .falseVariables(falseVariables) .deferredFragmentIdentifiers(deferredFragmentIds) + .errors(if (ignoreErrors) emptyList() else errors) .build() return adapter().nullable().fromJson(jsonReader, customScalarAdapters1) } diff --git a/libraries/apollo-api/src/commonMain/kotlin/com/apollographql/apollo3/api/FieldResult.kt b/libraries/apollo-api/src/commonMain/kotlin/com/apollographql/apollo3/api/FieldResult.kt new file mode 100644 index 00000000000..e46772bae48 --- /dev/null +++ b/libraries/apollo-api/src/commonMain/kotlin/com/apollographql/apollo3/api/FieldResult.kt @@ -0,0 +1,23 @@ +package com.apollographql.apollo3.api + +import com.apollographql.apollo3.exception.ApolloException +import com.apollographql.apollo3.exception.ApolloGraphQLException +import com.apollographql.apollo3.exception.DefaultApolloException + +sealed interface FieldResult { + class Success(val value: V) : FieldResult + class Failure(val exception: ApolloException) : FieldResult +} + +val FieldResult.isSuccess: Boolean get() = this is FieldResult.Success +fun FieldResult.getOrElse(fallback: V): V = if (this is FieldResult.Success) value else fallback +fun FieldResult.getOrNull(): V? = if (this is FieldResult.Success) value else null +fun FieldResult.exceptionOrNull(): Exception? = if (this is FieldResult.Failure) exception else null +fun FieldResult.graphQLErrorOrNull(): Error? = (exceptionOrNull() as? ApolloGraphQLException)?.error + +fun FieldResult.getOrThrow(): V { + return when (this) { + is FieldResult.Success -> value + is FieldResult.Failure -> throw DefaultApolloException("Field error", exception) + } +} diff --git a/libraries/apollo-api/src/commonMain/kotlin/com/apollographql/apollo3/api/internal/ResponseParser.kt b/libraries/apollo-api/src/commonMain/kotlin/com/apollographql/apollo3/api/internal/ResponseParser.kt index 83bd31c2848..1b6a7c16880 100644 --- a/libraries/apollo-api/src/commonMain/kotlin/com/apollographql/apollo3/api/internal/ResponseParser.kt +++ b/libraries/apollo-api/src/commonMain/kotlin/com/apollographql/apollo3/api/internal/ResponseParser.kt @@ -34,7 +34,7 @@ internal object ResponseParser { when (jsonReader.nextName()) { "data" -> { val falseVariables = operation.falseVariables(customScalarAdapters) - data = operation.parseData(jsonReader, customScalarAdapters, falseVariables, deferredFragmentIds) + data = operation.parseData(jsonReader, customScalarAdapters, falseVariables, deferredFragmentIds, errors) } "errors" -> errors = jsonReader.readErrors() "extensions" -> extensions = jsonReader.readAny() as? Map 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 fb4db23b908..e982d28704c 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 @@ -101,7 +101,12 @@ class JsonDataException(message: String) : ApolloException(message) */ class ApolloParseException(message: String? = null, cause: Throwable? = null) : ApolloException(message = message, cause = cause) -class ApolloGraphQLException(val errors: List): ApolloException("GraphQL error(s)") +class ApolloGraphQLException(val error: Error): ApolloException("GraphQL error") { + constructor(errors: List): this(errors.first()) + + @Deprecated("Use error instead", level = DeprecationLevel.ERROR) + val errors: List = listOf(error) +} /** * An object/field was missing in the cache diff --git a/libraries/apollo-ast/api/apollo-ast.api b/libraries/apollo-ast/api/apollo-ast.api index d7ab7e636f5..c9cfae34670 100644 --- a/libraries/apollo-ast/api/apollo-ast.api +++ b/libraries/apollo-ast/api/apollo-ast.api @@ -771,6 +771,7 @@ public final class com/apollographql/apollo3/ast/GqldocumentKt { public static final fun builtinDefinitions ()Ljava/util/List; public static final fun kotlinLabsDefinitions (Ljava/lang/String;)Ljava/util/List; public static final fun linkDefinitions ()Ljava/util/List; + public static final fun nullabilityDefinitions (Ljava/lang/String;)Ljava/util/List; public static final fun toSchema (Lcom/apollographql/apollo3/ast/GQLDocument;)Lcom/apollographql/apollo3/ast/Schema; public static final fun withBuiltinDefinitions (Lcom/apollographql/apollo3/ast/GQLDocument;)Lcom/apollographql/apollo3/ast/GQLDocument; public static final fun withoutBuiltinDefinitions (Lcom/apollographql/apollo3/ast/GQLDocument;)Lcom/apollographql/apollo3/ast/GQLDocument; @@ -929,16 +930,20 @@ public final class com/apollographql/apollo3/ast/ReservedEnumValueName : com/apo } public final class com/apollographql/apollo3/ast/Schema { + public static final field CATCH Ljava/lang/String; public static final field Companion Lcom/apollographql/apollo3/ast/Schema$Companion; public static final field FIELD_POLICY Ljava/lang/String; public static final field FIELD_POLICY_FOR_FIELD Ljava/lang/String; public static final field FIELD_POLICY_KEY_ARGS Ljava/lang/String; public static final field FIELD_POLICY_PAGINATION_ARGS Ljava/lang/String; + public static final field IGNORE_ERRORS Ljava/lang/String; public static final field NONNULL Ljava/lang/String; public static final field OPTIONAL Ljava/lang/String; public static final field REQUIRES_OPT_IN Ljava/lang/String; + public static final field SEMANTIC_NON_NULL Ljava/lang/String; public static final field TYPE_POLICY Ljava/lang/String; public final fun getDirectiveDefinitions ()Ljava/util/Map; + public final fun getErrorAware ()Z public final fun getForeignNames ()Ljava/util/Map; public final fun getMutationTypeDefinition ()Lcom/apollographql/apollo3/ast/GQLTypeDefinition; public final fun getQueryTypeDefinition ()Lcom/apollographql/apollo3/ast/GQLTypeDefinition; diff --git a/libraries/apollo-ast/src/commonMain/kotlin/com/apollographql/apollo3/ast/Schema.kt b/libraries/apollo-ast/src/commonMain/kotlin/com/apollographql/apollo3/ast/Schema.kt index 7ffd4ced8eb..169a59d8995 100644 --- a/libraries/apollo-ast/src/commonMain/kotlin/com/apollographql/apollo3/ast/Schema.kt +++ b/libraries/apollo-ast/src/commonMain/kotlin/com/apollographql/apollo3/ast/Schema.kt @@ -30,6 +30,9 @@ class Schema internal constructor( @ApolloInternal val connectionTypes: Set, ) { + @ApolloInternal + val schemaDefinition: GQLSchemaDefinition? = definitions.filterIsInstance().singleOrNull() + val typeDefinitions: Map = definitions .filterIsInstance() .associateBy { it.name } @@ -38,6 +41,10 @@ class Schema internal constructor( .filterIsInstance() .associateBy { it.name } + val errorAware: Boolean = directiveDefinitions.any { + originalDirectiveName(it.key) == CATCH + } + val queryTypeDefinition: GQLTypeDefinition = rootOperationTypeDefinition("query", definitions) ?: throw SchemaValidationException("No query root type found") @@ -95,6 +102,7 @@ class Schema internal constructor( // This could certainly be improved possibleTypes(it).toList() }.toSet() + is GQLObjectTypeDefinition -> setOf(typeDefinition.name) is GQLScalarTypeDefinition -> setOf(typeDefinition.name) is GQLEnumTypeDefinition -> typeDefinition.enumValues.map { it.name }.toSet() @@ -143,11 +151,13 @@ class Schema internal constructor( }.map { it.name } typeDefinition.implementsInterfaces.flatMap { implementedTypes(it) }.toSet() + name + unions } + is GQLInterfaceTypeDefinition -> typeDefinition.implementsInterfaces.flatMap { implementedTypes(it) }.toSet() + name is GQLUnionTypeDefinition, is GQLScalarTypeDefinition, is GQLEnumTypeDefinition, -> setOf(name) + else -> error("Cannot determine implementedTypes of $name") } } @@ -195,6 +205,13 @@ class Schema internal constructor( const val OPTIONAL = "optional" const val REQUIRES_OPT_IN = "requiresOptIn" + @ApolloExperimental + const val CATCH = "catch" + @ApolloExperimental + const val SEMANTIC_NON_NULL = "semanticNonNull" + @ApolloExperimental + const val IGNORE_ERRORS = "ignoreErrors" + const val FIELD_POLICY_FOR_FIELD = "forField" const val FIELD_POLICY_KEY_ARGS = "keyArgs" diff --git a/libraries/apollo-ast/src/commonMain/kotlin/com/apollographql/apollo3/ast/gqldirective.kt b/libraries/apollo-ast/src/commonMain/kotlin/com/apollographql/apollo3/ast/gqldirective.kt index f5f244f2c1e..c280bf7332a 100644 --- a/libraries/apollo-ast/src/commonMain/kotlin/com/apollographql/apollo3/ast/gqldirective.kt +++ b/libraries/apollo-ast/src/commonMain/kotlin/com/apollographql/apollo3/ast/gqldirective.kt @@ -74,3 +74,94 @@ fun List.optionalValue(schema: Schema?): Boolean? { @ApolloInternal fun List.findNonnull(schema: Schema) = any { schema.originalDirectiveName(it.name) == Schema.NONNULL } + +@ApolloInternal +enum class CatchTo { + RESULT, + NULL, + THROW +} + +@ApolloInternal +data class Catch(val to: CatchTo, val level: Int?) + +private fun GQLDirectiveDefinition.getArgumentDefaultValue(argName: String): GQLValue? { + return arguments.firstOrNull { it.name == argName }?.defaultValue +} + +@ApolloInternal +fun GQLDirective.getArgument(argName: String, schema: Schema): GQLValue? { + val directiveDefinition: GQLDirectiveDefinition = schema.directiveDefinitions.get(name)!! + val argument = arguments.firstOrNull { it.name == argName } + if (argument == null) { + return directiveDefinition.getArgumentDefaultValue(argName) + } + return argument.value +} + +private fun GQLValue.toIntOrNull(): Int? { + return when (this) { + is GQLNullValue -> null + is GQLIntValue -> this.value.toIntOrNull() + else -> error("${sourceLocation}: expected Int value") + } +} + +private fun GQLValue.toStringOrNull(): String? { + return when (this) { + is GQLNullValue -> null + is GQLStringValue -> this.value + else -> error("${sourceLocation}: expected String value") + } +} + +private fun GQLValue?.toBoolean(): Boolean { + return when (this) { + is GQLBooleanValue -> this.value + else -> error("${this?.sourceLocation}: expected Boolean! value") + } +} + +private fun GQLValue?.toCatchTo(): CatchTo { + return when (this) { + is GQLEnumValue -> when (this.value) { + "NULL" -> CatchTo.NULL + "RESULT" -> CatchTo.RESULT + "THROW" -> CatchTo.THROW + else -> error("Unknown CatchTo value: ${this.value}") + } + + else -> error("${this?.sourceLocation}: expected CatchTo! value") + } +} + +@ApolloInternal +fun List.findCatches(schema: Schema): List { + return filter { + schema.originalDirectiveName(it.name) == Schema.CATCH + }.map { + Catch( + to = it.getArgument("to", schema).toCatchTo(), + level = it.getArgument("level", schema)?.toIntOrNull(), + ) + } +} + +@ApolloInternal +fun GQLFieldDefinition.findSemanticNonNulls(schema: Schema): List { + return directives.filter { + schema.originalDirectiveName(it.name) == Schema.SEMANTIC_NON_NULL + }.map { + it.getArgument("level", schema)?.toIntOrNull() + } +} + +@ApolloInternal +fun GQLTypeDefinition.findSemanticNonNulls(fieldName: String, schema: Schema): List { + return directives.filter { + schema.originalDirectiveName(it.name) == Schema.SEMANTIC_NON_NULL + && it.getArgument("field", schema)?.toStringOrNull() == fieldName + }.map { + it.getArgument("level", schema)?.toIntOrNull() + } +} \ No newline at end of file diff --git a/libraries/apollo-ast/src/commonMain/kotlin/com/apollographql/apollo3/ast/gqldocument.kt b/libraries/apollo-ast/src/commonMain/kotlin/com/apollographql/apollo3/ast/gqldocument.kt index 28ca129e506..6d5e274471a 100644 --- a/libraries/apollo-ast/src/commonMain/kotlin/com/apollographql/apollo3/ast/gqldocument.kt +++ b/libraries/apollo-ast/src/commonMain/kotlin/com/apollographql/apollo3/ast/gqldocument.kt @@ -3,10 +3,11 @@ package com.apollographql.apollo3.ast import com.apollographql.apollo3.annotations.ApolloDeprecatedSince import com.apollographql.apollo3.annotations.ApolloExperimental import com.apollographql.apollo3.ast.internal.ExtensionsMerger -import com.apollographql.apollo3.ast.internal.apolloDefinitionsStr import com.apollographql.apollo3.ast.internal.builtinsDefinitionsStr import com.apollographql.apollo3.ast.internal.ensureSchemaDefinition +import com.apollographql.apollo3.ast.internal.kotlinLabsDefinitions import com.apollographql.apollo3.ast.internal.linkDefinitionsStr +import com.apollographql.apollo3.ast.internal.nullabilityDefinitionsStr import okio.Buffer /** @@ -79,15 +80,25 @@ fun builtinDefinitions() = definitionsFromString(builtinsDefinitionsStr) fun linkDefinitions() = definitionsFromString(linkDefinitionsStr) /** - * Extra apollo specific definitions from https://specs.apollo.dev/kotlin_labs/<[version]> + * Extra apollo Kotlin specific definitions from https://specs.apollo.dev/kotlin_labs/<[version]> */ fun kotlinLabsDefinitions(version: String): List { return definitionsFromString(when (version) { - "v0.2" -> apolloDefinitionsStr + "v0.2" -> kotlinLabsDefinitions else -> error("kotlin_labs/$version definitions are not supported, please use v0.2") }) } +/** + * Extra nullability definitions from https://specs.apollo.dev/nullability/<[version]> + */ +fun nullabilityDefinitions(version: String): List { + return definitionsFromString(when (version) { + "v0.1" -> nullabilityDefinitionsStr + else -> error("nullability/$version definitions are not supported, please use v0.1") + }) +} + private fun definitionsFromString(string: String): List { return string .parseAsGQLDocument() diff --git a/libraries/apollo-ast/src/commonMain/kotlin/com/apollographql/apollo3/ast/internal/ExecutableValidationScope.kt b/libraries/apollo-ast/src/commonMain/kotlin/com/apollographql/apollo3/ast/internal/ExecutableValidationScope.kt index 466bcd7abec..3b28bd6e219 100644 --- a/libraries/apollo-ast/src/commonMain/kotlin/com/apollographql/apollo3/ast/internal/ExecutableValidationScope.kt +++ b/libraries/apollo-ast/src/commonMain/kotlin/com/apollographql/apollo3/ast/internal/ExecutableValidationScope.kt @@ -1,52 +1,8 @@ package com.apollographql.apollo3.ast.internal import com.apollographql.apollo3.annotations.ApolloInternal -import com.apollographql.apollo3.ast.AnonymousOperation -import com.apollographql.apollo3.ast.DeprecatedUsage -import com.apollographql.apollo3.ast.DifferentShape -import com.apollographql.apollo3.ast.ExecutableValidationResult -import com.apollographql.apollo3.ast.GQLArgument -import com.apollographql.apollo3.ast.GQLBooleanValue -import com.apollographql.apollo3.ast.GQLDirective -import com.apollographql.apollo3.ast.GQLDocument -import com.apollographql.apollo3.ast.GQLEnumTypeDefinition -import com.apollographql.apollo3.ast.GQLEnumValue -import com.apollographql.apollo3.ast.GQLField -import com.apollographql.apollo3.ast.GQLFloatValue -import com.apollographql.apollo3.ast.GQLFragmentDefinition -import com.apollographql.apollo3.ast.GQLFragmentSpread -import com.apollographql.apollo3.ast.GQLInlineFragment -import com.apollographql.apollo3.ast.GQLIntValue -import com.apollographql.apollo3.ast.GQLListType -import com.apollographql.apollo3.ast.GQLListValue -import com.apollographql.apollo3.ast.GQLNamedType -import com.apollographql.apollo3.ast.GQLNode -import com.apollographql.apollo3.ast.GQLNonNullType -import com.apollographql.apollo3.ast.GQLNullValue -import com.apollographql.apollo3.ast.GQLObjectTypeDefinition -import com.apollographql.apollo3.ast.GQLObjectValue -import com.apollographql.apollo3.ast.GQLOperationDefinition -import com.apollographql.apollo3.ast.GQLScalarTypeDefinition -import com.apollographql.apollo3.ast.GQLSelection -import com.apollographql.apollo3.ast.GQLStringValue -import com.apollographql.apollo3.ast.GQLType -import com.apollographql.apollo3.ast.GQLTypeDefinition -import com.apollographql.apollo3.ast.GQLValue -import com.apollographql.apollo3.ast.GQLVariableValue -import com.apollographql.apollo3.ast.Issue -import com.apollographql.apollo3.ast.OtherValidationIssue -import com.apollographql.apollo3.ast.Schema -import com.apollographql.apollo3.ast.UnusedFragment -import com.apollographql.apollo3.ast.UnusedVariable -import com.apollographql.apollo3.ast.VariableUsage -import com.apollographql.apollo3.ast.definitionFromScope -import com.apollographql.apollo3.ast.findDeprecationReason +import com.apollographql.apollo3.ast.* import com.apollographql.apollo3.ast.internal.validation.validateDeferLabels -import com.apollographql.apollo3.ast.pretty -import com.apollographql.apollo3.ast.rawType -import com.apollographql.apollo3.ast.responseName -import com.apollographql.apollo3.ast.rootTypeDefinition -import com.apollographql.apollo3.ast.sharesPossibleTypesWith @OptIn(ApolloInternal::class) @@ -67,6 +23,7 @@ internal class ExecutableValidationScope( private val fragmentVariableUsages = mutableMapOf>() private val cyclicFragments = mutableSetOf() private val usedFragments = mutableSetOf() + private val hasCatch = schema.directiveDefinitions.any { schema.originalTypeName(it.key) == Schema.CATCH } /** * These are scoped to the current operation/fragment being validated @@ -219,6 +176,83 @@ internal class ExecutableValidationScope( variableUsages.add(it) } } + if (hasCatch) { + validateCatches(fieldDefinition) + } + } + + private class CatchUsage(val level: Int?, val catchTo: String, val sourceLocation: SourceLocation?) + + private fun GQLType.maxDimension(): Int { + var dimension = 0 + var type = this + while (true) { + when(type) { + is GQLListType -> { + dimension++ + type = type.type + } + is GQLNonNullType -> { + type = type.type + } + else -> return dimension + } + } + } + private fun GQLField.validateCatches(fieldDefinition: GQLFieldDefinition) { + val levelToCatch = directives.filter { + schema.originalDirectiveName(it.name) == Schema.CATCH + }.mapNotNull { + val to = it.getArgument("to", schema) as? GQLEnumValue + if (to == null) { + // caught by other validation rules + return@mapNotNull null + } + val levelInt = when(val levelValue = it.getArgument("level", schema)) { + is GQLNullValue -> null + is GQLIntValue -> levelValue.value.toIntOrNull() ?: error("`@catch` level too big: ${levelValue.value}") + else -> return@mapNotNull null + } + + if (levelInt != null) { + val maxDimension = fieldDefinition.type.maxDimension() + if (levelInt > maxDimension) { + registerIssue( + message = "Invalid 'level' value '$levelInt' for `@catch` usage: this type has a max list level of $maxDimension", + sourceLocation = it.sourceLocation + ) + return@mapNotNull null + } + } + CatchUsage(levelInt, to.value, it.sourceLocation) + }.groupBy { + it.level + }.mapNotNull { + val sameLevel = it.value.distinct() + if (sameLevel.size > 1) { + registerIssue( + message = "Conflicting `@catch` usages for level '${it.key}': a given list level must have a single CatchTo value", + sourceLocation = it.value.first().sourceLocation + ) + return@mapNotNull null + } + + it.value.single() + }.associateBy { + it.level + } + + val default = levelToCatch[null]?.catchTo + levelToCatch.filter { + it.key != null + }.forEach { + if (default != null && it.value.catchTo != default) { + registerIssue( + message = "Conflicting `@catch` usages for level '${it.key}': this level conflicts with the default 'null' level", + sourceLocation = it.value.sourceLocation + ) + } + } } private fun GQLInlineFragment.validate(parentTypeDefinition: GQLTypeDefinition) { @@ -344,6 +378,7 @@ internal class ExecutableValidationScope( validateCommon(this, selections, directives, rootTypeDefinition) fieldsInSetCanMerge(selections.collectFields(rootTypeDefinition.name)) + issues.addAll(validateDeferLabels(this, rootTypeDefinition.name, schema, fragmentDefinitions)) val allVariableUsages = selections.collectFragmentSpreads().flatMap { fragmentVariableUsages.get(it) ?: emptyList() } + variableUsages @@ -438,6 +473,10 @@ internal class ExecutableValidationScope( addFieldMergingIssue(fieldWithParentA.field, fieldWithParentB.field, "they have different types") return } + if (hasCatch && !areCatchesEqual(fieldA.directives.findCatches(schema), fieldB.directives.findCatches(schema))) { + addFieldMergingIssue(fieldWithParentA.field, fieldWithParentB.field, "they have different `@catch` directives") + return + } if (!areArgumentsEqual(fieldA.arguments, fieldB.arguments)) { addFieldMergingIssue(fieldWithParentA.field, fieldWithParentB.field, "they have different arguments") @@ -486,13 +525,17 @@ internal class ExecutableValidationScope( } } + private fun areCatchesEqual(catchesA: List, catchesB: List): Boolean { + return catchesA.toSet() == catchesB.toSet() + } + private fun areArgumentsEqual(argumentsA: List, argumentsB: List): Boolean { if (argumentsA.size != argumentsB.size) { return false } (argumentsA + argumentsB).groupBy { - // other validations will ensure no duplicates so it's safe to + // other validations will ensure no duplicates, so it's safe to // put everything in a Map here it.name }.values.forEach { diff --git a/libraries/apollo-ast/src/commonMain/kotlin/com/apollographql/apollo3/ast/internal/InputValueValidationScope.kt b/libraries/apollo-ast/src/commonMain/kotlin/com/apollographql/apollo3/ast/internal/InputValueValidationScope.kt index dee943ac1e9..b52c329b15f 100644 --- a/libraries/apollo-ast/src/commonMain/kotlin/com/apollographql/apollo3/ast/internal/InputValueValidationScope.kt +++ b/libraries/apollo-ast/src/commonMain/kotlin/com/apollographql/apollo3/ast/internal/InputValueValidationScope.kt @@ -118,6 +118,10 @@ internal fun ValidationScope.validateAndCoerceValue( return validateAndCoerceEnum(value, expectedTypeDefinition) } + null -> { + registerIssue("Unknown type '${expectedType.pretty()}' for input value", value.sourceLocation) + return value + } else -> { registerIssue("Value cannot be of non-input type ${expectedType.pretty()}", value.sourceLocation) return value diff --git a/libraries/apollo-ast/src/commonMain/kotlin/com/apollographql/apollo3/ast/internal/SchemaValidationScope.kt b/libraries/apollo-ast/src/commonMain/kotlin/com/apollographql/apollo3/ast/internal/SchemaValidationScope.kt index 56a80186ac2..467ca9ed5c6 100644 --- a/libraries/apollo-ast/src/commonMain/kotlin/com/apollographql/apollo3/ast/internal/SchemaValidationScope.kt +++ b/libraries/apollo-ast/src/commonMain/kotlin/com/apollographql/apollo3/ast/internal/SchemaValidationScope.kt @@ -16,6 +16,7 @@ import com.apollographql.apollo3.ast.GQLListValue import com.apollographql.apollo3.ast.GQLNamed import com.apollographql.apollo3.ast.GQLNamedType import com.apollographql.apollo3.ast.GQLNonNullType +import com.apollographql.apollo3.ast.GQLNullValue import com.apollographql.apollo3.ast.GQLObjectTypeDefinition import com.apollographql.apollo3.ast.GQLObjectValue import com.apollographql.apollo3.ast.GQLOperationTypeDefinition @@ -28,20 +29,21 @@ import com.apollographql.apollo3.ast.GQLTypeDefinition import com.apollographql.apollo3.ast.GQLTypeDefinition.Companion.builtInTypes import com.apollographql.apollo3.ast.GQLTypeSystemExtension import com.apollographql.apollo3.ast.GQLUnionTypeDefinition +import com.apollographql.apollo3.ast.IncompatibleDirectiveDefinition import com.apollographql.apollo3.ast.Issue import com.apollographql.apollo3.ast.MergeOptions import com.apollographql.apollo3.ast.NoQueryType import com.apollographql.apollo3.ast.OtherValidationIssue import com.apollographql.apollo3.ast.Schema import com.apollographql.apollo3.ast.Schema.Companion.TYPE_POLICY -import com.apollographql.apollo3.ast.IncompatibleDirectiveDefinition -import com.apollographql.apollo3.ast.kotlinLabsDefinitions import com.apollographql.apollo3.ast.builtinDefinitions import com.apollographql.apollo3.ast.canHaveKeyFields import com.apollographql.apollo3.ast.combineDefinitions import com.apollographql.apollo3.ast.findOneOf import com.apollographql.apollo3.ast.introspection.defaultSchemaDefinition +import com.apollographql.apollo3.ast.kotlinLabsDefinitions import com.apollographql.apollo3.ast.linkDefinitions +import com.apollographql.apollo3.ast.nullabilityDefinitions import com.apollographql.apollo3.ast.parseAsGQLSelections import com.apollographql.apollo3.ast.pretty import com.apollographql.apollo3.ast.rawType @@ -61,19 +63,19 @@ internal fun validateSchema(definitions: List, requiresApolloDefi var directivesToStrip = foreignSchemas.flatMap { it.directivesToStrip } - val apolloDefinitions = kotlinLabsDefinitions("v0.2") + val kotlinLabsDefinitions = kotlinLabsDefinitions("v0.2") if (requiresApolloDefinitions && foreignSchemas.none { it.name == "kotlin_labs" }) { /** * Strip all the apollo directives from outgoing operation documents. * This will also strip schema directives like @typePolicy that should never appear in executable documents */ - directivesToStrip = directivesToStrip + apolloDefinitions.filterIsInstance().map { it.name } + directivesToStrip = directivesToStrip + kotlinLabsDefinitions.filterIsInstance().map { it.name } /** * Put apolloDefinitions first so that they override the user one in the case of a conflict */ - foreignDefinitions = apolloDefinitions + foreignDefinitions + foreignDefinitions = kotlinLabsDefinitions + foreignDefinitions } allDefinitions = foreignDefinitions + allDefinitions @@ -182,6 +184,7 @@ internal fun validateSchema(definitions: List, requiresApolloDefi mergedScope.validateInterfaces() mergedScope.validateObjects() mergedScope.validateInputObjects() + mergedScope.validateCatch(mergedSchemaDefinition) val keyFields = mergedScope.validateAndComputeKeyFields() val connectionTypes = mergedScope.computeConnectionTypes() @@ -329,8 +332,14 @@ private fun List.getForeignSchemas( }.toMap() - if (foreignName == "kotlin_labs") { - val (definitions, renames) = kotlinLabsDefinitions(version).rename(mappings, prefix) + val foreignDefinitions = when (foreignName) { + "kotlin_labs" -> kotlinLabsDefinitions(version) + "nullability" -> nullabilityDefinitions(version) + else -> null + } + + if (foreignDefinitions != null) { + val (definitions, renames) = foreignDefinitions.rename(mappings, prefix) foreignSchemas.add( ForeignSchema( name = foreignName, @@ -434,6 +443,54 @@ private fun ValidationScope.validateObjects() { } } +private fun ValidationScope.validateCatch(schemaDefinition: GQLSchemaDefinition?) { + val hasCatchDefinition = directiveDefinitions.any { + originalDirectiveName(it.key) == Schema.CATCH + } + + if (!hasCatchDefinition) { + return + } + + if (schemaDefinition == null) { + issues.add(OtherValidationIssue( + message = "Schemas that include the `@catch` definition must opt-in a default CatchTo. Use `extend schema @catch(to: \$to)`", + sourceLocation = null + )) + return + } + + + val catches = schemaDefinition.directives.filter { + originalDirectiveName(it.name) == Schema.CATCH + } + + if (catches.isEmpty()) { + issues.add(OtherValidationIssue( + message = "Schemas that include the `@catch` definition must opt-in a default CatchTo. Use `extend schema @catch(to: \$to)`", + sourceLocation = schemaDefinition.sourceLocation + )) + return + } else if (catches.size > 1) { + issues.add(OtherValidationIssue( + message = "There can be only one `@catch` directive on the schema definition", + sourceLocation = schemaDefinition.sourceLocation + )) + return + } + + val catch = catches.single() + + catch.arguments.forEach { + if (it.name == "level" && it.value !is GQLNullValue) { + issues.add(OtherValidationIssue( + message = "The 'level' argument must be null when `@catch` is applied to the schema", + sourceLocation = it.sourceLocation + )) + } + } + +} private fun ValidationScope.validateInputObjects() { typeDefinitions.values.filterIsInstance().forEach { o -> if (o.inputFields.isEmpty()) { diff --git a/libraries/apollo-ast/src/commonMain/kotlin/com/apollographql/apollo3/ast/internal/definitions.kt b/libraries/apollo-ast/src/commonMain/kotlin/com/apollographql/apollo3/ast/internal/definitions.kt index edc25719a2a..a19448bbbd7 100644 --- a/libraries/apollo-ast/src/commonMain/kotlin/com/apollographql/apollo3/ast/internal/definitions.kt +++ b/libraries/apollo-ast/src/commonMain/kotlin/com/apollographql/apollo3/ast/internal/definitions.kt @@ -7,7 +7,7 @@ package com.apollographql.apollo3.ast.internal * - link.graphqls: the [core schemas](https://specs.apollo.dev/link/v1.0/) definitions. * - apollo-${version}.graphqls: the client directives supported by Apollo Kotlin. Changes are versioned at https://github.com/apollographql/specs. Changing them requires a new version and a PR. */ -internal val apolloDefinitionsStr = """ +internal val kotlinLabsDefinitions = """ ""${'"'} Marks a field or variable definition as optional or required By default Apollo Kotlin generates all variables of nullable types as optional, in compliance with the GraphQL specification, @@ -254,4 +254,85 @@ internal val linkDefinitionsStr = """ import: [Import], for: Purpose ) repeatable on SCHEMA +""".trimIndent() + +internal val nullabilityDefinitionsStr = """ +""${'"'} +Indicates that a field is only null if there is a matching error in the `errors` array. +In all other cases, the field is non-null. + +Tools doing code generation may use this information to generate the field as non-null. + +This directive can be applied on field definitions: + +```graphql +type User { + email: String @semanticNonNull +} +``` + +It can also be applied on object type extensions for use in client applications that do +not own the base schema: + +```graphql +extend type User @semanticNonNull(field: "email") +``` + +Control over list items is done using the `level` argument: + +```graphql +type User { + # friends is nullable but friends[0] is null only on errors + friends: [User] @semanticNonNull(level: 1) +} +``` + +The `field` argument is the name of the field if `@semanticNonNull` is applied to an object definition. +If `@semanticNonNull` is applied to a field definition, `field` must be null. + +The `level` argument can be used to indicate what level is semantically non null in case of lists. +`level` starts at 0 if there is no list. If `level` is null, all levels are semantically non null. +""${'"'} +directive @semanticNonNull(field: String = null, level: Int = null) repeatable on FIELD_DEFINITION | OBJECT + +""${'"'} +Indicates that the given position stops GraphQL errors to propagate up the tree. + +By default, the first GraphQL error stops the parsing and fails the whole response. +Using `@catch` recovers from this error and allows the parsing to continue. + +`@catch` must also be applied to the schema definition to specify the default to +use for every field that can return an error (nullable fields). + +The `to` argument can be used to choose how to recover from errors. See `CatchTo` +for more details. + +The `level` argument can be used to indicate where to catch in case of lists. +`level` starts at 0 if there is no list. If `level` is null, all levels catch. +""${'"'} +directive @catch(to: CatchTo! = RESULT, level: Int = null) repeatable on FIELD | SCHEMA + +enum CatchTo { + ""${'"'} + Map to a result type that can contain either a value or an error. + ""${'"'} + RESULT, + ""${'"'} + Map to a nullable type that will be null in the case of error. + This does not allow to distinguish between semantic null and error but + can be simpler in some cases. + ""${'"'} + NULL, + ""${'"'} + Do not catch and let any exception through + ""${'"'} + THROW +} + +""${'"'} +Never throw on field errors. + +This is used for backward compatibility for clients where this was the default behaviour. +""${'"'} +directive @ignoreFieldErrors on QUERY | MUTATION | SUBSCRIPTION """.trimIndent() \ No newline at end of file diff --git a/libraries/apollo-ast/src/commonMain/kotlin/com/apollographql/apollo3/ast/internal/validation/defer_labels.kt b/libraries/apollo-ast/src/commonMain/kotlin/com/apollographql/apollo3/ast/internal/validation/defer_labels.kt index 477d1f6b009..367f26ab8be 100644 --- a/libraries/apollo-ast/src/commonMain/kotlin/com/apollographql/apollo3/ast/internal/validation/defer_labels.kt +++ b/libraries/apollo-ast/src/commonMain/kotlin/com/apollographql/apollo3/ast/internal/validation/defer_labels.kt @@ -187,4 +187,4 @@ internal fun validateDeferLabels( fragments: Map, ): List { return Scope(schema, fragments).validate(operation, parentType) -} \ No newline at end of file +} diff --git a/libraries/apollo-ast/src/jvmTest/kotlin/com/apollographql/apollo3/graphql/ast/test/ParserTest.kt b/libraries/apollo-ast/src/jvmTest/kotlin/com/apollographql/apollo3/graphql/ast/test/ParserTest.kt index 1fffaa7f20d..660a3ae840b 100644 --- a/libraries/apollo-ast/src/jvmTest/kotlin/com/apollographql/apollo3/graphql/ast/test/ParserTest.kt +++ b/libraries/apollo-ast/src/jvmTest/kotlin/com/apollographql/apollo3/graphql/ast/test/ParserTest.kt @@ -44,14 +44,11 @@ class ParserTest { return true } - return when (System.getProperty("updateTestFixtures")?.trim()) { - "on", "true", "1" -> true - else -> false - } + return false } private fun testFilterMatches(value: String): Boolean { - val testFilter = System.getenv("testFilter") ?: System.getProperty("testFilter") ?: return true + val testFilter = System.getenv("testFilter") ?: return true return Regex(testFilter).containsMatchIn(value) } diff --git a/libraries/apollo-compiler/api/apollo-compiler.api b/libraries/apollo-compiler/api/apollo-compiler.api index a7884537882..402e62eea14 100644 --- a/libraries/apollo-compiler/api/apollo-compiler.api +++ b/libraries/apollo-compiler/api/apollo-compiler.api @@ -397,6 +397,20 @@ public final class com/apollographql/apollo3/compiler/codegen/java/adapter/Adapt public static synthetic fun singletonAdapterInitializer$default (Lcom/squareup/javapoet/TypeName;Lcom/squareup/javapoet/TypeName;ZILjava/lang/Object;)Lcom/squareup/javapoet/CodeBlock; } +public final class com/apollographql/apollo3/compiler/ir/IrCatchTo : java/lang/Enum { + public static final field Companion Lcom/apollographql/apollo3/compiler/ir/IrCatchTo$Companion; + public static final field NoCatch Lcom/apollographql/apollo3/compiler/ir/IrCatchTo; + public static final field Null Lcom/apollographql/apollo3/compiler/ir/IrCatchTo; + public static final field Result Lcom/apollographql/apollo3/compiler/ir/IrCatchTo; + public static fun getEntries ()Lkotlin/enums/EnumEntries; + public static fun valueOf (Ljava/lang/String;)Lcom/apollographql/apollo3/compiler/ir/IrCatchTo; + public static fun values ()[Lcom/apollographql/apollo3/compiler/ir/IrCatchTo; +} + +public final class com/apollographql/apollo3/compiler/ir/IrCatchTo$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + public final class com/apollographql/apollo3/compiler/ir/IrClassName { public fun (Ljava/lang/String;Ljava/util/List;)V public final fun asString ()Ljava/lang/String; @@ -413,15 +427,19 @@ public final class com/apollographql/apollo3/compiler/ir/IrClassName { public final class com/apollographql/apollo3/compiler/ir/IrEnumType : com/apollographql/apollo3/compiler/ir/IrNamedType { public static final field Companion Lcom/apollographql/apollo3/compiler/ir/IrEnumType$Companion; - public fun (Ljava/lang/String;ZZ)V - public synthetic fun (Ljava/lang/String;ZZILkotlin/jvm/internal/DefaultConstructorMarker;)V + public fun (Ljava/lang/String;ZZLcom/apollographql/apollo3/compiler/ir/IrCatchTo;Z)V + public synthetic fun (Ljava/lang/String;ZZLcom/apollographql/apollo3/compiler/ir/IrCatchTo;ZILkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun component1 ()Ljava/lang/String; public final fun component2 ()Z public final fun component3 ()Z - public final fun copy (Ljava/lang/String;ZZ)Lcom/apollographql/apollo3/compiler/ir/IrEnumType; - public static synthetic fun copy$default (Lcom/apollographql/apollo3/compiler/ir/IrEnumType;Ljava/lang/String;ZZILjava/lang/Object;)Lcom/apollographql/apollo3/compiler/ir/IrEnumType; - public fun copyWith (ZZ)Lcom/apollographql/apollo3/compiler/ir/IrType; + public final fun component4 ()Lcom/apollographql/apollo3/compiler/ir/IrCatchTo; + public final fun component5 ()Z + public final fun copy (Ljava/lang/String;ZZLcom/apollographql/apollo3/compiler/ir/IrCatchTo;Z)Lcom/apollographql/apollo3/compiler/ir/IrEnumType; + public static synthetic fun copy$default (Lcom/apollographql/apollo3/compiler/ir/IrEnumType;Ljava/lang/String;ZZLcom/apollographql/apollo3/compiler/ir/IrCatchTo;ZILjava/lang/Object;)Lcom/apollographql/apollo3/compiler/ir/IrEnumType; + public fun copyWith (ZZZLcom/apollographql/apollo3/compiler/ir/IrCatchTo;)Lcom/apollographql/apollo3/compiler/ir/IrType; public fun equals (Ljava/lang/Object;)Z + public fun getCatchTo ()Lcom/apollographql/apollo3/compiler/ir/IrCatchTo; + public fun getMaybeError ()Z public fun getName ()Ljava/lang/String; public fun getNullable ()Z public fun getOptional ()Z @@ -459,15 +477,19 @@ public final class com/apollographql/apollo3/compiler/ir/IrGraphqlTargetArgument public final class com/apollographql/apollo3/compiler/ir/IrInputObjectType : com/apollographql/apollo3/compiler/ir/IrNamedType { public static final field Companion Lcom/apollographql/apollo3/compiler/ir/IrInputObjectType$Companion; - public fun (Ljava/lang/String;ZZ)V - public synthetic fun (Ljava/lang/String;ZZILkotlin/jvm/internal/DefaultConstructorMarker;)V + public fun (Ljava/lang/String;ZZLcom/apollographql/apollo3/compiler/ir/IrCatchTo;Z)V + public synthetic fun (Ljava/lang/String;ZZLcom/apollographql/apollo3/compiler/ir/IrCatchTo;ZILkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun component1 ()Ljava/lang/String; public final fun component2 ()Z public final fun component3 ()Z - public final fun copy (Ljava/lang/String;ZZ)Lcom/apollographql/apollo3/compiler/ir/IrInputObjectType; - public static synthetic fun copy$default (Lcom/apollographql/apollo3/compiler/ir/IrInputObjectType;Ljava/lang/String;ZZILjava/lang/Object;)Lcom/apollographql/apollo3/compiler/ir/IrInputObjectType; - public fun copyWith (ZZ)Lcom/apollographql/apollo3/compiler/ir/IrType; + public final fun component4 ()Lcom/apollographql/apollo3/compiler/ir/IrCatchTo; + public final fun component5 ()Z + public final fun copy (Ljava/lang/String;ZZLcom/apollographql/apollo3/compiler/ir/IrCatchTo;Z)Lcom/apollographql/apollo3/compiler/ir/IrInputObjectType; + public static synthetic fun copy$default (Lcom/apollographql/apollo3/compiler/ir/IrInputObjectType;Ljava/lang/String;ZZLcom/apollographql/apollo3/compiler/ir/IrCatchTo;ZILjava/lang/Object;)Lcom/apollographql/apollo3/compiler/ir/IrInputObjectType; + public fun copyWith (ZZZLcom/apollographql/apollo3/compiler/ir/IrCatchTo;)Lcom/apollographql/apollo3/compiler/ir/IrType; public fun equals (Ljava/lang/Object;)Z + public fun getCatchTo ()Lcom/apollographql/apollo3/compiler/ir/IrCatchTo; + public fun getMaybeError ()Z public fun getName ()Ljava/lang/String; public fun getNullable ()Z public fun getOptional ()Z @@ -494,15 +516,19 @@ public final class com/apollographql/apollo3/compiler/ir/IrInputObjectType$Compa public final class com/apollographql/apollo3/compiler/ir/IrListType : com/apollographql/apollo3/compiler/ir/IrType { public static final field Companion Lcom/apollographql/apollo3/compiler/ir/IrListType$Companion; - public fun (Lcom/apollographql/apollo3/compiler/ir/IrType;ZZ)V - public synthetic fun (Lcom/apollographql/apollo3/compiler/ir/IrType;ZZILkotlin/jvm/internal/DefaultConstructorMarker;)V + public fun (Lcom/apollographql/apollo3/compiler/ir/IrType;ZZLcom/apollographql/apollo3/compiler/ir/IrCatchTo;Z)V + public synthetic fun (Lcom/apollographql/apollo3/compiler/ir/IrType;ZZLcom/apollographql/apollo3/compiler/ir/IrCatchTo;ZILkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun component1 ()Lcom/apollographql/apollo3/compiler/ir/IrType; public final fun component2 ()Z public final fun component3 ()Z - public final fun copy (Lcom/apollographql/apollo3/compiler/ir/IrType;ZZ)Lcom/apollographql/apollo3/compiler/ir/IrListType; - public static synthetic fun copy$default (Lcom/apollographql/apollo3/compiler/ir/IrListType;Lcom/apollographql/apollo3/compiler/ir/IrType;ZZILjava/lang/Object;)Lcom/apollographql/apollo3/compiler/ir/IrListType; - public fun copyWith (ZZ)Lcom/apollographql/apollo3/compiler/ir/IrType; + public final fun component4 ()Lcom/apollographql/apollo3/compiler/ir/IrCatchTo; + public final fun component5 ()Z + public final fun copy (Lcom/apollographql/apollo3/compiler/ir/IrType;ZZLcom/apollographql/apollo3/compiler/ir/IrCatchTo;Z)Lcom/apollographql/apollo3/compiler/ir/IrListType; + public static synthetic fun copy$default (Lcom/apollographql/apollo3/compiler/ir/IrListType;Lcom/apollographql/apollo3/compiler/ir/IrType;ZZLcom/apollographql/apollo3/compiler/ir/IrCatchTo;ZILjava/lang/Object;)Lcom/apollographql/apollo3/compiler/ir/IrListType; + public fun copyWith (ZZZLcom/apollographql/apollo3/compiler/ir/IrCatchTo;)Lcom/apollographql/apollo3/compiler/ir/IrType; public fun equals (Ljava/lang/Object;)Z + public fun getCatchTo ()Lcom/apollographql/apollo3/compiler/ir/IrCatchTo; + public fun getMaybeError ()Z public fun getNullable ()Z public final fun getOfType ()Lcom/apollographql/apollo3/compiler/ir/IrType; public fun getOptional ()Z @@ -538,15 +564,19 @@ public final class com/apollographql/apollo3/compiler/ir/IrNamedType$Companion { public final class com/apollographql/apollo3/compiler/ir/IrObjectType : com/apollographql/apollo3/compiler/ir/IrNamedType { public static final field Companion Lcom/apollographql/apollo3/compiler/ir/IrObjectType$Companion; - public fun (Ljava/lang/String;ZZ)V - public synthetic fun (Ljava/lang/String;ZZILkotlin/jvm/internal/DefaultConstructorMarker;)V + public fun (Ljava/lang/String;ZZLcom/apollographql/apollo3/compiler/ir/IrCatchTo;Z)V + public synthetic fun (Ljava/lang/String;ZZLcom/apollographql/apollo3/compiler/ir/IrCatchTo;ZILkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun component1 ()Ljava/lang/String; public final fun component2 ()Z public final fun component3 ()Z - public final fun copy (Ljava/lang/String;ZZ)Lcom/apollographql/apollo3/compiler/ir/IrObjectType; - public static synthetic fun copy$default (Lcom/apollographql/apollo3/compiler/ir/IrObjectType;Ljava/lang/String;ZZILjava/lang/Object;)Lcom/apollographql/apollo3/compiler/ir/IrObjectType; - public fun copyWith (ZZ)Lcom/apollographql/apollo3/compiler/ir/IrType; + public final fun component4 ()Lcom/apollographql/apollo3/compiler/ir/IrCatchTo; + public final fun component5 ()Z + public final fun copy (Ljava/lang/String;ZZLcom/apollographql/apollo3/compiler/ir/IrCatchTo;Z)Lcom/apollographql/apollo3/compiler/ir/IrObjectType; + public static synthetic fun copy$default (Lcom/apollographql/apollo3/compiler/ir/IrObjectType;Ljava/lang/String;ZZLcom/apollographql/apollo3/compiler/ir/IrCatchTo;ZILjava/lang/Object;)Lcom/apollographql/apollo3/compiler/ir/IrObjectType; + public fun copyWith (ZZZLcom/apollographql/apollo3/compiler/ir/IrCatchTo;)Lcom/apollographql/apollo3/compiler/ir/IrType; public fun equals (Ljava/lang/Object;)Z + public fun getCatchTo ()Lcom/apollographql/apollo3/compiler/ir/IrCatchTo; + public fun getMaybeError ()Z public fun getName ()Ljava/lang/String; public fun getNullable ()Z public fun getOptional ()Z @@ -583,15 +613,19 @@ public final class com/apollographql/apollo3/compiler/ir/IrOperationsKt { public final class com/apollographql/apollo3/compiler/ir/IrScalarType : com/apollographql/apollo3/compiler/ir/IrNamedType { public static final field Companion Lcom/apollographql/apollo3/compiler/ir/IrScalarType$Companion; - public fun (Ljava/lang/String;ZZ)V - public synthetic fun (Ljava/lang/String;ZZILkotlin/jvm/internal/DefaultConstructorMarker;)V + public fun (Ljava/lang/String;ZZLcom/apollographql/apollo3/compiler/ir/IrCatchTo;Z)V + public synthetic fun (Ljava/lang/String;ZZLcom/apollographql/apollo3/compiler/ir/IrCatchTo;ZILkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun component1 ()Ljava/lang/String; public final fun component2 ()Z public final fun component3 ()Z - public final fun copy (Ljava/lang/String;ZZ)Lcom/apollographql/apollo3/compiler/ir/IrScalarType; - public static synthetic fun copy$default (Lcom/apollographql/apollo3/compiler/ir/IrScalarType;Ljava/lang/String;ZZILjava/lang/Object;)Lcom/apollographql/apollo3/compiler/ir/IrScalarType; - public fun copyWith (ZZ)Lcom/apollographql/apollo3/compiler/ir/IrType; + public final fun component4 ()Lcom/apollographql/apollo3/compiler/ir/IrCatchTo; + public final fun component5 ()Z + public final fun copy (Ljava/lang/String;ZZLcom/apollographql/apollo3/compiler/ir/IrCatchTo;Z)Lcom/apollographql/apollo3/compiler/ir/IrScalarType; + public static synthetic fun copy$default (Lcom/apollographql/apollo3/compiler/ir/IrScalarType;Ljava/lang/String;ZZLcom/apollographql/apollo3/compiler/ir/IrCatchTo;ZILjava/lang/Object;)Lcom/apollographql/apollo3/compiler/ir/IrScalarType; + public fun copyWith (ZZZLcom/apollographql/apollo3/compiler/ir/IrCatchTo;)Lcom/apollographql/apollo3/compiler/ir/IrType; public fun equals (Ljava/lang/Object;)Z + public fun getCatchTo ()Lcom/apollographql/apollo3/compiler/ir/IrCatchTo; + public fun getMaybeError ()Z public fun getName ()Ljava/lang/String; public fun getNullable ()Z public fun getOptional ()Z @@ -652,8 +686,10 @@ public final class com/apollographql/apollo3/compiler/ir/IrTargetObject { public abstract interface class com/apollographql/apollo3/compiler/ir/IrType { public static final field Companion Lcom/apollographql/apollo3/compiler/ir/IrType$Companion; - public abstract fun copyWith (ZZ)Lcom/apollographql/apollo3/compiler/ir/IrType; - public static synthetic fun copyWith$default (Lcom/apollographql/apollo3/compiler/ir/IrType;ZZILjava/lang/Object;)Lcom/apollographql/apollo3/compiler/ir/IrType; + public abstract fun copyWith (ZZZLcom/apollographql/apollo3/compiler/ir/IrCatchTo;)Lcom/apollographql/apollo3/compiler/ir/IrType; + public static synthetic fun copyWith$default (Lcom/apollographql/apollo3/compiler/ir/IrType;ZZZLcom/apollographql/apollo3/compiler/ir/IrCatchTo;ILjava/lang/Object;)Lcom/apollographql/apollo3/compiler/ir/IrType; + public abstract fun getCatchTo ()Lcom/apollographql/apollo3/compiler/ir/IrCatchTo; + public abstract fun getMaybeError ()Z public abstract fun getNullable ()Z public abstract fun getOptional ()Z public abstract fun rawType ()Lcom/apollographql/apollo3/compiler/ir/IrNamedType; @@ -664,6 +700,8 @@ public final class com/apollographql/apollo3/compiler/ir/IrType$Companion { } public final class com/apollographql/apollo3/compiler/ir/IrTypeKt { + public static final fun catchTo (Lcom/apollographql/apollo3/compiler/ir/IrType;Lcom/apollographql/apollo3/compiler/ir/IrCatchTo;)Lcom/apollographql/apollo3/compiler/ir/IrType; + public static final fun maybeError (Lcom/apollographql/apollo3/compiler/ir/IrType;Z)Lcom/apollographql/apollo3/compiler/ir/IrType; public static final fun nullable (Lcom/apollographql/apollo3/compiler/ir/IrType;Z)Lcom/apollographql/apollo3/compiler/ir/IrType; public static final fun optional (Lcom/apollographql/apollo3/compiler/ir/IrType;Z)Lcom/apollographql/apollo3/compiler/ir/IrType; } diff --git a/libraries/apollo-compiler/src/main/kotlin/com/apollographql/apollo3/compiler/codegen/ClassNames.kt b/libraries/apollo-compiler/src/main/kotlin/com/apollographql/apollo3/compiler/codegen/ClassNames.kt index dcf4c4be39b..85ccf9d5004 100644 --- a/libraries/apollo-compiler/src/main/kotlin/com/apollographql/apollo3/compiler/codegen/ClassNames.kt +++ b/libraries/apollo-compiler/src/main/kotlin/com/apollographql/apollo3/compiler/codegen/ClassNames.kt @@ -61,4 +61,5 @@ internal object ClassNames { val MandatoryTypenameProperty = ResolverClassName(apolloApiTestPackageName, "MandatoryTypenameProperty") val JetBrainsNullable = ResolverClassName(jetbrainsAnnotationsPackageName, "Nullable") val JetBrainsNonNull = ResolverClassName(jetbrainsAnnotationsPackageName, "NotNull") + val FieldResult = ResolverClassName(apolloApiPackageName, "FieldResult") } diff --git a/libraries/apollo-compiler/src/main/kotlin/com/apollographql/apollo3/compiler/codegen/Identifiers.kt b/libraries/apollo-compiler/src/main/kotlin/com/apollographql/apollo3/compiler/codegen/Identifiers.kt index 3864ae3bb30..9d5f5162599 100644 --- a/libraries/apollo-compiler/src/main/kotlin/com/apollographql/apollo3/compiler/codegen/Identifiers.kt +++ b/libraries/apollo-compiler/src/main/kotlin/com/apollographql/apollo3/compiler/codegen/Identifiers.kt @@ -1,6 +1,7 @@ package com.apollographql.apollo3.compiler.codegen internal object Identifier { + const val ignoreErrors = "ignoreErrors" const val __h: String = "__h" const val adapter = "adapter" const val evaluate = "evaluate" diff --git a/libraries/apollo-compiler/src/main/kotlin/com/apollographql/apollo3/compiler/codegen/java/JavaResolver.kt b/libraries/apollo-compiler/src/main/kotlin/com/apollographql/apollo3/compiler/codegen/java/JavaResolver.kt index 5516d0e461e..d20bde9323c 100644 --- a/libraries/apollo-compiler/src/main/kotlin/com/apollographql/apollo3/compiler/codegen/java/JavaResolver.kt +++ b/libraries/apollo-compiler/src/main/kotlin/com/apollographql/apollo3/compiler/codegen/java/JavaResolver.kt @@ -12,6 +12,7 @@ import com.apollographql.apollo3.compiler.codegen.ResolverKey import com.apollographql.apollo3.compiler.codegen.ResolverKeyKind import com.apollographql.apollo3.compiler.codegen.java.adapter.singletonAdapterInitializer import com.apollographql.apollo3.compiler.hooks.ApolloCompilerJavaHooks +import com.apollographql.apollo3.compiler.ir.IrCatchTo import com.apollographql.apollo3.compiler.ir.IrCompositeType2 import com.apollographql.apollo3.compiler.ir.IrEnumType import com.apollographql.apollo3.compiler.ir.IrEnumType2 @@ -108,6 +109,8 @@ internal class JavaResolver( fun resolveIrType(type: IrType): TypeName { return if (type.optional) { resolveIrType(type.optional(false)).wrapInOptional().addNonNullableAnnotation() + } else if (type.catchTo != IrCatchTo.NoCatch) { + error("Java codegen does not support @catch") } else if (type.nullable) { resolveRawIrType(type).boxIfPrimitiveType().let { if (wrapNullableFieldsInOptional) it.wrapInOptional() else it.addNullableAnnotation() @@ -185,10 +188,12 @@ internal class JavaResolver( return if (type.optional) { val adapterClassName = if (!type.rawType().isComposite()) optionalAdapterClassName else optionalAdapterClassName return CodeBlock.of("new $T<>($L)", adapterClassName, adapterInitializer(type.optional(false), requiresBuffering)) + } else if (type.catchTo != IrCatchTo.NoCatch) { + error("Java codegen does not support @catch") } else if (type.nullable) { // Don't hardcode the adapter when the scalar is mapped to a user-defined type val scalarWithoutCustomMapping = type is IrScalarType && !scalarMapping.containsKey(type.name) - when { + when { type is IrScalarType && type.name == "String" && scalarWithoutCustomMapping -> scalarAdapterCodeBlock("String") type is IrScalarType && type.name == "ID" && scalarWithoutCustomMapping -> scalarAdapterCodeBlock("String") type is IrScalarType && type.name == "Boolean" && scalarWithoutCustomMapping -> scalarAdapterCodeBlock("Boolean") diff --git a/libraries/apollo-compiler/src/main/kotlin/com/apollographql/apollo3/compiler/codegen/java/file/ExecutableCommon.kt b/libraries/apollo-compiler/src/main/kotlin/com/apollographql/apollo3/compiler/codegen/java/file/ExecutableCommon.kt index 3d295b231ed..8bcf0ec93a7 100644 --- a/libraries/apollo-compiler/src/main/kotlin/com/apollographql/apollo3/compiler/codegen/java/file/ExecutableCommon.kt +++ b/libraries/apollo-compiler/src/main/kotlin/com/apollographql/apollo3/compiler/codegen/java/file/ExecutableCommon.kt @@ -1,7 +1,9 @@ package com.apollographql.apollo3.compiler.codegen.java.file +import com.apollographql.apollo3.compiler.capitalizeFirstLetter import com.apollographql.apollo3.compiler.codegen.Identifier import com.apollographql.apollo3.compiler.codegen.Identifier.customScalarAdapters +import com.apollographql.apollo3.compiler.codegen.Identifier.ignoreErrors import com.apollographql.apollo3.compiler.codegen.Identifier.root import com.apollographql.apollo3.compiler.codegen.Identifier.rootField import com.apollographql.apollo3.compiler.codegen.Identifier.serializeVariables @@ -42,6 +44,15 @@ internal fun serializeVariablesMethodSpec( .build() } +internal fun ignoreErrorsFunSpec(value: Boolean): MethodSpec { + return MethodSpec.methodBuilder("get${ignoreErrors.capitalizeFirstLetter()}") + .addModifiers(Modifier.PUBLIC) + .addAnnotation(JavaClassNames.Override) + .returns(TypeName.BOOLEAN) + .addCode("return $L;", value.toString()) + .build() +} + internal fun adapterMethodSpec( resolver: JavaResolver, property: IrProperty, diff --git a/libraries/apollo-compiler/src/main/kotlin/com/apollographql/apollo3/compiler/codegen/java/file/FragmentBuilder.kt b/libraries/apollo-compiler/src/main/kotlin/com/apollographql/apollo3/compiler/codegen/java/file/FragmentBuilder.kt index ba60d635894..92962b1e51b 100644 --- a/libraries/apollo-compiler/src/main/kotlin/com/apollographql/apollo3/compiler/codegen/java/file/FragmentBuilder.kt +++ b/libraries/apollo-compiler/src/main/kotlin/com/apollographql/apollo3/compiler/codegen/java/file/FragmentBuilder.kt @@ -74,6 +74,7 @@ internal class FragmentBuilder( .addMethod(serializeVariablesMethodSpec()) .addMethod(adapterMethodSpec(context.resolver, fragment.dataProperty)) .addMethod(selectionsMethodSpec()) + .addMethod(ignoreErrorsFunSpec(false)) // Fragments can have multiple data shapes .addTypes(dataTypeSpecs()) .build() diff --git a/libraries/apollo-compiler/src/main/kotlin/com/apollographql/apollo3/compiler/codegen/java/file/OperationBuilder.kt b/libraries/apollo-compiler/src/main/kotlin/com/apollographql/apollo3/compiler/codegen/java/file/OperationBuilder.kt index 6d96a433429..6e8fafc67df 100644 --- a/libraries/apollo-compiler/src/main/kotlin/com/apollographql/apollo3/compiler/codegen/java/file/OperationBuilder.kt +++ b/libraries/apollo-compiler/src/main/kotlin/com/apollographql/apollo3/compiler/codegen/java/file/OperationBuilder.kt @@ -105,6 +105,7 @@ internal class OperationBuilder( addMethod(buildDataOverloadMethod()) } .addTypes(dataTypeSpecs()) + .addMethod(ignoreErrorsFunSpec(false)) .addField( FieldSpec.builder(JavaClassNames.String, OPERATION_ID) .addModifiers(Modifier.FINAL) diff --git a/libraries/apollo-compiler/src/main/kotlin/com/apollographql/apollo3/compiler/codegen/kotlin/KotlinCodeGen.kt b/libraries/apollo-compiler/src/main/kotlin/com/apollographql/apollo3/compiler/codegen/kotlin/KotlinCodeGen.kt index 05902ae6784..0bf375d71b8 100644 --- a/libraries/apollo-compiler/src/main/kotlin/com/apollographql/apollo3/compiler/codegen/kotlin/KotlinCodeGen.kt +++ b/libraries/apollo-compiler/src/main/kotlin/com/apollographql/apollo3/compiler/codegen/kotlin/KotlinCodeGen.kt @@ -200,7 +200,13 @@ internal object KotlinCodeGen { generateMethods = generateMethods, jsExport = jsExport, layout = layout, - resolver = KotlinResolver(emptyList(), upstreamResolver, scalarMapping, requiresOptInAnnotation, hooks), + resolver = KotlinResolver( + entries = emptyList(), + next = upstreamResolver, + scalarMapping = scalarMapping, + requiresOptInAnnotation = requiresOptInAnnotation, + hooks = hooks + ), targetLanguageVersion = targetLanguageVersion, ) val builders = mutableListOf() @@ -329,7 +335,13 @@ internal object KotlinCodeGen { generateMethods = emptyList(), jsExport = false, layout = layout, - resolver = KotlinResolver(emptyList(), null, codegenSchema.scalarMapping, null, ApolloCompilerKotlinHooks.Identity), + resolver = KotlinResolver( + entries = emptyList(), + next = null, + scalarMapping = codegenSchema.scalarMapping, + requiresOptInAnnotation = null, + hooks = ApolloCompilerKotlinHooks.Identity + ), targetLanguageVersion = TargetLanguage.KOTLIN_1_9, ) val builders = mutableListOf() @@ -378,12 +390,24 @@ internal object KotlinCodeGen { decapitalizeFields = false, ) - val upstreamResolver = KotlinResolver(codegenMetadata.resolverInfo.entries, null, codegenSchema.scalarMapping, null, ApolloCompilerKotlinHooks.Identity) + val upstreamResolver = KotlinResolver( + entries = codegenMetadata.resolverInfo.entries, + next = null, + scalarMapping = codegenSchema.scalarMapping, + requiresOptInAnnotation = null, + hooks = ApolloCompilerKotlinHooks.Identity + ) val context = KotlinContext( generateMethods = emptyList(), jsExport = false, layout = layout, - resolver = KotlinResolver(emptyList(), upstreamResolver, codegenSchema.scalarMapping, null, ApolloCompilerKotlinHooks.Identity), + resolver = KotlinResolver( + entries = emptyList(), + next = upstreamResolver, + scalarMapping = codegenSchema.scalarMapping, + requiresOptInAnnotation = null, + hooks = ApolloCompilerKotlinHooks.Identity + ), targetLanguageVersion = TargetLanguage.KOTLIN_1_9, ) diff --git a/libraries/apollo-compiler/src/main/kotlin/com/apollographql/apollo3/compiler/codegen/kotlin/KotlinResolver.kt b/libraries/apollo-compiler/src/main/kotlin/com/apollographql/apollo3/compiler/codegen/kotlin/KotlinResolver.kt index 433d5808272..04ffe70ffa4 100644 --- a/libraries/apollo-compiler/src/main/kotlin/com/apollographql/apollo3/compiler/codegen/kotlin/KotlinResolver.kt +++ b/libraries/apollo-compiler/src/main/kotlin/com/apollographql/apollo3/compiler/codegen/kotlin/KotlinResolver.kt @@ -11,6 +11,7 @@ import com.apollographql.apollo3.compiler.codegen.ResolverKey import com.apollographql.apollo3.compiler.codegen.ResolverKeyKind import com.apollographql.apollo3.compiler.codegen.kotlin.adapter.obj import com.apollographql.apollo3.compiler.hooks.ApolloCompilerKotlinHooks +import com.apollographql.apollo3.compiler.ir.IrCatchTo import com.apollographql.apollo3.compiler.ir.IrCompositeType2 import com.apollographql.apollo3.compiler.ir.IrEnumType import com.apollographql.apollo3.compiler.ir.IrEnumType2 @@ -25,6 +26,8 @@ import com.apollographql.apollo3.compiler.ir.IrScalarType import com.apollographql.apollo3.compiler.ir.IrScalarType2 import com.apollographql.apollo3.compiler.ir.IrType import com.apollographql.apollo3.compiler.ir.IrType2 +import com.apollographql.apollo3.compiler.ir.catchTo +import com.apollographql.apollo3.compiler.ir.maybeError import com.apollographql.apollo3.compiler.ir.nullable import com.apollographql.apollo3.compiler.ir.optional import com.squareup.kotlinpoet.ClassName @@ -77,32 +80,46 @@ internal class KotlinResolver( } internal fun resolveIrType(type: IrType, jsExport: Boolean, isInterface: Boolean = false): TypeName { - if (type.optional) { - return KotlinSymbols.Optional.parameterizedBy(resolveIrType(type.optional(false), jsExport, isInterface)) - } else if (type.nullable) { - return resolveIrType(type.nullable(false), jsExport, isInterface).copy(nullable = true) - } else { - return when (type) { - is IrListType -> resolveIrType(type.ofType, jsExport, isInterface).wrapInList(jsExport, isInterface) - is IrScalarType -> { - // Try mapping first, then built-ins, then fallback to Any - resolveScalarTarget(type.name) ?: when (type.name) { - "String" -> KotlinSymbols.String - "Float" -> KotlinSymbols.Double - "Int" -> KotlinSymbols.Int - "Boolean" -> KotlinSymbols.Boolean - "ID" -> KotlinSymbols.String - else -> KotlinSymbols.Any + return when { + type.optional -> { + KotlinSymbols.Optional.parameterizedBy(resolveIrType(type.optional(false), jsExport, isInterface)) + } + type.catchTo != IrCatchTo.NoCatch -> { + resolveIrType(type.catchTo(IrCatchTo.NoCatch), jsExport, isInterface).let { + when (type.catchTo) { + IrCatchTo.Null -> it.copy(nullable = true) + IrCatchTo.Result -> KotlinSymbols.FieldResult.parameterizedBy(it) + IrCatchTo.NoCatch -> error("") // keep the compiler happy } } - is IrModelType -> resolveAndAssert(ResolverKeyKind.Model, type.path) - is IrEnumType -> if (jsExport) { - KotlinSymbols.String - } else { - resolveAndAssert(ResolverKeyKind.SchemaType, type.name) - } + } + type.nullable -> { + resolveIrType(type.nullable(false), jsExport, isInterface).copy(nullable = true) + } + else -> { + when (type) { + is IrListType -> resolveIrType(type.ofType, jsExport, isInterface).wrapInList(jsExport, isInterface) + is IrScalarType -> { + // Try mapping first, then built-ins, then fallback to Any + resolveScalarTarget(type.name) ?: when (type.name) { + "String" -> KotlinSymbols.String + "Float" -> KotlinSymbols.Double + "Int" -> KotlinSymbols.Int + "Boolean" -> KotlinSymbols.Boolean + "ID" -> KotlinSymbols.String + else -> KotlinSymbols.Any + } + } - is IrNamedType -> resolveAndAssert(ResolverKeyKind.SchemaType, type.name) + is IrModelType -> resolveAndAssert(ResolverKeyKind.Model, type.path) + is IrEnumType -> if (jsExport) { + KotlinSymbols.String + } else { + resolveAndAssert(ResolverKeyKind.SchemaType, type.name) + } + + is IrNamedType -> resolveAndAssert(ResolverKeyKind.SchemaType, type.name) + } } } } @@ -180,54 +197,73 @@ internal class KotlinResolver( } internal fun adapterInitializer(type: IrType, requiresBuffering: Boolean, jsExport: Boolean, runtimeAdapterPrefix: String): CodeBlock { - return if (type.optional) { - val presentFun = MemberName("com.apollographql.apollo3.api", "present") - CodeBlock.of("%L.%M()", adapterInitializer(type.optional(false), requiresBuffering, jsExport, runtimeAdapterPrefix), presentFun) - } else if (type.nullable) { - // Don't hardcode the adapter when the scalar is mapped to a user-defined type - val scalarWithoutCustomMapping = type is IrScalarType && !scalarMapping.containsKey(type.name) - when { - type is IrScalarType && type.name == "ID" && scalarWithoutCustomMapping -> CodeBlock.of("%M", KotlinSymbols.NullableStringAdapter) - type is IrScalarType && type.name == "Boolean" && scalarWithoutCustomMapping -> CodeBlock.of("%M", KotlinSymbols.NullableBooleanAdapter) - type is IrScalarType && type.name == "String" && scalarWithoutCustomMapping -> CodeBlock.of("%M", KotlinSymbols.NullableStringAdapter) - type is IrScalarType && type.name == "Int" && scalarWithoutCustomMapping -> CodeBlock.of("%M", KotlinSymbols.NullableIntAdapter) - type is IrScalarType && type.name == "Float" && scalarWithoutCustomMapping -> CodeBlock.of("%M", KotlinSymbols.NullableDoubleAdapter) - type is IrScalarType && resolveScalarTarget(type.name) == null -> { - CodeBlock.of("%M", KotlinSymbols.NullableAnyAdapter) - } - - else -> { - val nullableFun = MemberName("com.apollographql.apollo3.api", "nullable") - CodeBlock.of("%L.%M()", adapterInitializer(type.nullable(false), requiresBuffering, jsExport, runtimeAdapterPrefix), nullableFun) + return when { + type.optional -> { + val presentFun = MemberName("com.apollographql.apollo3.api", "present") + CodeBlock.of("%L.%M()", adapterInitializer(type.optional(false), requiresBuffering, jsExport, runtimeAdapterPrefix), presentFun) + } + type.catchTo != IrCatchTo.NoCatch -> { + adapterInitializer(type.catchTo(IrCatchTo.NoCatch), requiresBuffering, jsExport, runtimeAdapterPrefix).let { + val member = when (type.catchTo) { + IrCatchTo.Null -> KotlinSymbols.catchToNull + IrCatchTo.Result -> KotlinSymbols.catchToResult + IrCatchTo.NoCatch -> error("") // happy compiler + } + CodeBlock.of("%L.%M()", it, member) } } - } else { - when (type) { - is IrListType -> { - adapterInitializer(type.ofType, requiresBuffering, jsExport, runtimeAdapterPrefix).list(jsExport) + type.maybeError -> { + adapterInitializer(type.maybeError(false), requiresBuffering, jsExport, runtimeAdapterPrefix).let { + CodeBlock.of("%L.%M()", it, KotlinSymbols.errorAware) } + } + type.nullable -> { + // Don't hardcode the adapter when the scalar is mapped to a user-defined type + val scalarWithoutCustomMapping = type is IrScalarType && !scalarMapping.containsKey(type.name) + when { + type is IrScalarType && type.name == "ID" && scalarWithoutCustomMapping -> CodeBlock.of("%M", KotlinSymbols.NullableStringAdapter) + type is IrScalarType && type.name == "Boolean" && scalarWithoutCustomMapping -> CodeBlock.of("%M", KotlinSymbols.NullableBooleanAdapter) + type is IrScalarType && type.name == "String" && scalarWithoutCustomMapping -> CodeBlock.of("%M", KotlinSymbols.NullableStringAdapter) + type is IrScalarType && type.name == "Int" && scalarWithoutCustomMapping -> CodeBlock.of("%M", KotlinSymbols.NullableIntAdapter) + type is IrScalarType && type.name == "Float" && scalarWithoutCustomMapping -> CodeBlock.of("%M", KotlinSymbols.NullableDoubleAdapter) + type is IrScalarType && resolveScalarTarget(type.name) == null -> { + CodeBlock.of("%M", KotlinSymbols.NullableAnyAdapter) + } - is IrScalarType -> { - scalarAdapterInitializer(type.name, runtimeAdapterPrefix) + else -> { + val nullableFun = MemberName("com.apollographql.apollo3.api", "nullable") + CodeBlock.of("%L.%M()", adapterInitializer(type.nullable(false), requiresBuffering, jsExport, runtimeAdapterPrefix), nullableFun) + } } + } + else -> { + when (type) { + is IrListType -> { + adapterInitializer(type.ofType, requiresBuffering, jsExport, runtimeAdapterPrefix).list(jsExport) + } - is IrEnumType -> { - if (jsExport) { - scalarAdapterInitializer("String", runtimeAdapterPrefix) - } else { - CodeBlock.of("%T", resolveAndAssert(ResolverKeyKind.SchemaTypeAdapter, type.name)) + is IrScalarType -> { + scalarAdapterInitializer(type.name, runtimeAdapterPrefix) } - } - is IrInputObjectType -> { - CodeBlock.of("%T", resolveAndAssert(ResolverKeyKind.SchemaTypeAdapter, type.name)).obj(requiresBuffering) - } + is IrEnumType -> { + if (jsExport) { + scalarAdapterInitializer("String", runtimeAdapterPrefix) + } else { + CodeBlock.of("%T", resolveAndAssert(ResolverKeyKind.SchemaTypeAdapter, type.name)) + } + } - is IrModelType -> { - CodeBlock.of("%T", resolveAndAssert(ResolverKeyKind.ModelAdapter, type.path)).obj(requiresBuffering) - } + is IrInputObjectType -> { + CodeBlock.of("%T", resolveAndAssert(ResolverKeyKind.SchemaTypeAdapter, type.name)).obj(requiresBuffering) + } + + is IrModelType -> { + CodeBlock.of("%T", resolveAndAssert(ResolverKeyKind.ModelAdapter, type.path)).obj(requiresBuffering) + } - is IrObjectType -> error("IrObjectType cannot be adapted") + is IrObjectType -> error("IrObjectType cannot be adapted") + } } } } diff --git a/libraries/apollo-compiler/src/main/kotlin/com/apollographql/apollo3/compiler/codegen/kotlin/KotlinSymbols.kt b/libraries/apollo-compiler/src/main/kotlin/com/apollographql/apollo3/compiler/codegen/kotlin/KotlinSymbols.kt index a699f60c749..9d5409676f9 100644 --- a/libraries/apollo-compiler/src/main/kotlin/com/apollographql/apollo3/compiler/codegen/kotlin/KotlinSymbols.kt +++ b/libraries/apollo-compiler/src/main/kotlin/com/apollographql/apollo3/compiler/codegen/kotlin/KotlinSymbols.kt @@ -113,11 +113,15 @@ internal object KotlinSymbols { val JsExport = ClassName("kotlin.js", "JsExport") val obj = MemberName(apolloApiPackageName, "obj") + val catchToResult = MemberName(apolloApiPackageName, "catchToResult") + val catchToNull = MemberName(apolloApiPackageName, "catchToNull") + val errorAware = MemberName(apolloApiPackageName, "errorAware") val readTypename = MemberName(apolloApiJsonPackageName, "readTypename") val buildData = MemberName(apolloApiPackageName, "buildData") val GlobalBuilder = MemberName(apolloApiPackageName, "GlobalBuilder") val assertOneOf = MemberName(apolloApiPackageName, "assertOneOf") val missingField = MemberName(apolloApiPackageName, "missingField") + val FieldResult = ClassNames.FieldResult.toKotlinPoetClassName() } internal fun ResolverClassName.toKotlinPoetClassName(): ClassName = ClassName(packageName, simpleNames) diff --git a/libraries/apollo-compiler/src/main/kotlin/com/apollographql/apollo3/compiler/codegen/kotlin/adapter/AdapterCommon.kt b/libraries/apollo-compiler/src/main/kotlin/com/apollographql/apollo3/compiler/codegen/kotlin/adapter/AdapterCommon.kt index 2c6adaaff2e..f422db71759 100644 --- a/libraries/apollo-compiler/src/main/kotlin/com/apollographql/apollo3/compiler/codegen/kotlin/adapter/AdapterCommon.kt +++ b/libraries/apollo-compiler/src/main/kotlin/com/apollographql/apollo3/compiler/codegen/kotlin/adapter/AdapterCommon.kt @@ -17,6 +17,7 @@ import com.apollographql.apollo3.compiler.codegen.kotlin.KotlinSymbols import com.apollographql.apollo3.compiler.codegen.kotlin.helpers.codeBlock import com.apollographql.apollo3.compiler.ir.BLabel import com.apollographql.apollo3.compiler.ir.BooleanExpression +import com.apollographql.apollo3.compiler.ir.IrCatchTo import com.apollographql.apollo3.compiler.ir.IrModel import com.apollographql.apollo3.compiler.ir.IrModelType import com.apollographql.apollo3.compiler.ir.IrProperty @@ -158,7 +159,7 @@ internal fun readFromResponseCodeBlock( .indent() .add(model.properties.map { property -> val maybeAssertNotNull = if ( - !property.info.type.nullable + (property.info.type.catchTo == IrCatchTo.Result || !property.info.type.nullable) && !property.info.type.optional && !checkedProperties.contains(property.info.responseName) ) { diff --git a/libraries/apollo-compiler/src/main/kotlin/com/apollographql/apollo3/compiler/codegen/kotlin/file/ExecutableCommon.kt b/libraries/apollo-compiler/src/main/kotlin/com/apollographql/apollo3/compiler/codegen/kotlin/file/ExecutableCommon.kt index 63bc428ae4c..d7fc5447ffb 100644 --- a/libraries/apollo-compiler/src/main/kotlin/com/apollographql/apollo3/compiler/codegen/kotlin/file/ExecutableCommon.kt +++ b/libraries/apollo-compiler/src/main/kotlin/com/apollographql/apollo3/compiler/codegen/kotlin/file/ExecutableCommon.kt @@ -17,6 +17,7 @@ import com.squareup.kotlinpoet.CodeBlock import com.squareup.kotlinpoet.FunSpec import com.squareup.kotlinpoet.KModifier import com.squareup.kotlinpoet.ParameterizedTypeName.Companion.parameterizedBy +import com.squareup.kotlinpoet.PropertySpec import com.squareup.kotlinpoet.TypeName import com.squareup.kotlinpoet.TypeSpec @@ -44,6 +45,13 @@ internal fun serializeVariablesFunSpec( .build() } +internal fun ignoreErrorsPropertySpec(value: Boolean): PropertySpec { + return PropertySpec.builder(Identifier.ignoreErrors, KotlinSymbols.Boolean) + .addModifiers(KModifier.OVERRIDE) + .initializer(value.toString()) + .build() +} + internal fun adapterFunSpec( context: KotlinContext, property: IrProperty, diff --git a/libraries/apollo-compiler/src/main/kotlin/com/apollographql/apollo3/compiler/codegen/kotlin/file/FragmentBuilder.kt b/libraries/apollo-compiler/src/main/kotlin/com/apollographql/apollo3/compiler/codegen/kotlin/file/FragmentBuilder.kt index b1b176e68c5..f314c87c5ea 100644 --- a/libraries/apollo-compiler/src/main/kotlin/com/apollographql/apollo3/compiler/codegen/kotlin/file/FragmentBuilder.kt +++ b/libraries/apollo-compiler/src/main/kotlin/com/apollographql/apollo3/compiler/codegen/kotlin/file/FragmentBuilder.kt @@ -105,6 +105,7 @@ internal class FragmentBuilder( .build() ) } + .addProperty(ignoreErrorsPropertySpec(false)) .build() .maybeAddFilterNotNull(generateFilterNotNull) } diff --git a/libraries/apollo-compiler/src/main/kotlin/com/apollographql/apollo3/compiler/codegen/kotlin/file/OperationBuilder.kt b/libraries/apollo-compiler/src/main/kotlin/com/apollographql/apollo3/compiler/codegen/kotlin/file/OperationBuilder.kt index 75f6eee269f..91f7b4cee8b 100644 --- a/libraries/apollo-compiler/src/main/kotlin/com/apollographql/apollo3/compiler/codegen/kotlin/file/OperationBuilder.kt +++ b/libraries/apollo-compiler/src/main/kotlin/com/apollographql/apollo3/compiler/codegen/kotlin/file/OperationBuilder.kt @@ -115,6 +115,7 @@ internal class OperationBuilder( .addFunction(rootFieldFunSpec()) .addTypes(dataTypeSpecs()) .addType(companionTypeSpec()) + .addProperty(ignoreErrorsPropertySpec(operation.ignoreErrors)) .build() .maybeAddFilterNotNull(generateFilterNotNull) } diff --git a/libraries/apollo-compiler/src/main/kotlin/com/apollographql/apollo3/compiler/ir/IrOperations.kt b/libraries/apollo-compiler/src/main/kotlin/com/apollographql/apollo3/compiler/ir/IrOperations.kt index 58716e7151b..5d1286f38ed 100644 --- a/libraries/apollo-compiler/src/main/kotlin/com/apollographql/apollo3/compiler/ir/IrOperations.kt +++ b/libraries/apollo-compiler/src/main/kotlin/com/apollographql/apollo3/compiler/ir/IrOperations.kt @@ -68,6 +68,7 @@ internal data class IrOperation( val responseBasedDataModelGroup: IrModelGroup?, val dataProperty: IrProperty, val dataModelGroup: IrModelGroup, + val ignoreErrors: Boolean, ) @Serializable diff --git a/libraries/apollo-compiler/src/main/kotlin/com/apollographql/apollo3/compiler/ir/IrOperationsBuilder.kt b/libraries/apollo-compiler/src/main/kotlin/com/apollographql/apollo3/compiler/ir/IrOperationsBuilder.kt index 36f267be3e7..c56b5166ee1 100644 --- a/libraries/apollo-compiler/src/main/kotlin/com/apollographql/apollo3/compiler/ir/IrOperationsBuilder.kt +++ b/libraries/apollo-compiler/src/main/kotlin/com/apollographql/apollo3/compiler/ir/IrOperationsBuilder.kt @@ -1,5 +1,7 @@ package com.apollographql.apollo3.compiler.ir +import com.apollographql.apollo3.ast.Catch +import com.apollographql.apollo3.ast.CatchTo import com.apollographql.apollo3.ast.GQLBooleanValue import com.apollographql.apollo3.ast.GQLDirective import com.apollographql.apollo3.ast.GQLEnumTypeDefinition @@ -32,9 +34,11 @@ import com.apollographql.apollo3.ast.TransformResult import com.apollographql.apollo3.ast.VariableUsage import com.apollographql.apollo3.ast.definitionFromScope import com.apollographql.apollo3.ast.fieldDefinitions +import com.apollographql.apollo3.ast.findCatches import com.apollographql.apollo3.ast.findDeprecationReason import com.apollographql.apollo3.ast.findNonnull import com.apollographql.apollo3.ast.findOptInFeature +import com.apollographql.apollo3.ast.findSemanticNonNulls import com.apollographql.apollo3.ast.isFieldNonNull import com.apollographql.apollo3.ast.optionalValue import com.apollographql.apollo3.ast.pretty @@ -84,6 +88,8 @@ internal class IrOperationsBuilder( else -> error("codegenModels='$codegenModels' is not supported") } + private val defaultCatch = schema.schemaDefinition?.directives?.findCatches(schema)?.singleOrNull() + fun build(): IrOperations { val operations = operationDefinitions.map { it.toIr() } val fragments = fragmentDefinitions.map { it.toIr() } @@ -98,7 +104,7 @@ internal class IrOperationsBuilder( */ val visitedTypes = mutableSetOf() val typesToVisit = usedFields.keys.toMutableList() - while(typesToVisit.isNotEmpty()) { + while (typesToVisit.isNotEmpty()) { val name = typesToVisit.removeFirst() if (visitedTypes.contains(name)) { continue @@ -186,21 +192,24 @@ internal class IrOperationsBuilder( /** * Unions reference their members, generate them: * + * ``` * public class SearchResult { * public companion object { * public val type: UnionType = UnionType("SearchResult", Human.type, Droid.type, Starship.type) * } * } + * ``` */ - typeDefinition.memberTypes.forEach { - if (generateDataBuilders) { - usedFields.putAllFields(it.name, usedFields[name].orEmpty()) - } else { - usedFields.putType(it.name) - } - typesToVisit.add(it.name) + typeDefinition.memberTypes.forEach { + if (generateDataBuilders) { + usedFields.putAllFields(it.name, usedFields[name].orEmpty()) + } else { + usedFields.putType(it.name) } + typesToVisit.add(it.name) + } } + is GQLInputObjectTypeDefinition -> { /** * Loop on the input types. @@ -214,6 +223,7 @@ internal class IrOperationsBuilder( typesToVisit.add(fieldType.name) usedFields.putType(fieldType.name) } + is GQLEnumTypeDefinition -> { typesToVisit.add(fieldType.name) usedFields.putType(fieldType.name) @@ -301,7 +311,10 @@ internal class IrOperationsBuilder( filePath = sourceLocation!!.filePath!!, dataProperty = dataProperty, dataModelGroup = dataModelGroup, - responseBasedDataModelGroup = responseBasedModelGroup + responseBasedDataModelGroup = responseBasedModelGroup, + ignoreErrors = directives.any { + schema.originalDirectiveName(it.name) == Schema.IGNORE_ERRORS + } ) } @@ -383,7 +396,7 @@ internal class IrOperationsBuilder( * @throws IllegalStateException if some incompatibles types are found. This should never happen * because this should be caught during previous operation-wide validation. */ - fun inferFragmentVariables(fragment: GQLFragmentDefinition): List { + private fun inferFragmentVariables(fragment: GQLFragmentDefinition): List { return fragmentVariableUsages.get(fragment.name).orEmpty().groupBy { it.variable.name }.entries.map { @@ -470,7 +483,8 @@ internal class IrOperationsBuilder( val type: GQLType, val deprecationReason: String?, val optInFeature: String?, - val forceNonNull: Boolean, + val semanticNonNulls: List, + val catches: List, val forceOptional: Boolean, /** @@ -492,7 +506,31 @@ internal class IrOperationsBuilder( check(fieldDefinition != null) { "cannot find field definition for field '${gqlField.responseName()}' of type '${parentTypeDefinition.name}'" } - val forceNonNull = gqlField.directives.findNonnull(schema) || parentTypeDefinition.isFieldNonNull(gqlField.name, schema) + + var semanticNonNulls = fieldDefinition.findSemanticNonNulls(schema) + + parentTypeDefinition.findSemanticNonNulls(gqlField.name, schema).let { + if (it.isNotEmpty()) { + check(semanticNonNulls.isEmpty()) { + "${gqlField.sourceLocation}: field '${gqlField.responseName()}' already has nullability annotations (@nonnull, @semanticNonNull) in the schema." + } + semanticNonNulls = it + } + } + + if (parentTypeDefinition.isFieldNonNull(gqlField.name, schema)) { + check(semanticNonNulls.isEmpty()) { + "${gqlField.sourceLocation}: field '${gqlField.responseName()}' already has nullability annotations (@nonnull, @semanticNonNull) in the schema." + } + semanticNonNulls = listOf(0) + } + + if (gqlField.directives.findNonnull(schema)) { + check(semanticNonNulls.isEmpty()) { + "${gqlField.sourceLocation}: field '${gqlField.responseName()}' already has nullability annotations (@nonnull, @semanticNonNull) in the schema." + } + semanticNonNulls = listOf(0) + } CollectedField( name = gqlField.name, @@ -503,9 +541,10 @@ internal class IrOperationsBuilder( description = fieldDefinition.description, deprecationReason = fieldDefinition.directives.findDeprecationReason(), optInFeature = fieldDefinition.directives.findOptInFeature(schema), - forceNonNull = forceNonNull, + semanticNonNulls = semanticNonNulls, forceOptional = gqlField.directives.optionalValue(schema) == true, parentType = fieldWithParent.parentType, + catches = gqlField.directives.findCatches(schema) ) }.groupBy { it.responseName @@ -522,9 +561,6 @@ internal class IrOperationsBuilder( val first = fieldsWithSameResponseName.first() val childSelections = fieldsWithSameResponseName.flatMap { it.selections } - val forceNonNull = fieldsWithSameResponseName.any { - it.forceNonNull - } val forceOptional = fieldsWithSameResponseName.any { it.forceOptional } @@ -574,12 +610,22 @@ internal class IrOperationsBuilder( */ usedFields.putType(first.type.rawType().name) - var irType = first.type.toIr() - if (forceNonNull) { - irType = irType.nullable(false) - } else if (forceOptional) { - irType = irType.nullable(true) - } + val irType = first + .type + .toIr(schema) + .semanticNonNull(first.semanticNonNulls, 0) + .let { + /** + * We map @optional fields to nullable fields. This probably needs to be revisited in light of @catch + */ + if (forceOptional) { + it.nullable(true) + } else { + it + } + } + // Finally, transform into Result or Nullable depending on catch + .catch(first.catches, defaultCatch, 0) /** * Depending on the parent object/interface in which the field is queried, the field definition might have different descriptions/deprecationReasons @@ -629,6 +675,49 @@ internal class IrOperationsBuilder( } companion object { + private fun IrType.semanticNonNull(semanticNonNullLevels: List, level: Int): IrType { + val isNonNull = semanticNonNullLevels.any { it == null || it == level } + + return when (this) { + is IrNamedType -> this + is IrListType -> copy(ofType = ofType.semanticNonNull(semanticNonNullLevels, level + 1)) + }.let { + if (isNonNull) { + it.nullable(false) + } else { + it + } + } + } + + private fun IrType.catch(catchLevels: List, defaultCatch: Catch?, level: Int): IrType { + var catchLevel = catchLevels.firstOrNull { it.level == null || it.level == level } + var type = when (this) { + is IrNamedType -> this + is IrListType -> copy(ofType = ofType.catch(catchLevels, defaultCatch, level + 1)) + } + + if (catchLevel == null && type.maybeError) { + catchLevel = defaultCatch + } + if (catchLevel != null) { + type = type.catchTo(catchLevel.to.toIr()) + if (catchLevel.to == CatchTo.NULL) { + type = type.nullable(true) + } + } + + return type + } + + private fun CatchTo.toIr(): IrCatchTo { + return when (this) { + CatchTo.RESULT -> IrCatchTo.Result + CatchTo.NULL -> IrCatchTo.Null + CatchTo.THROW -> IrCatchTo.NoCatch + } + } + private fun MutableMap>.putField(typeName: String, fieldName: String) { compute(typeName) { _, v -> if (v == null) { diff --git a/libraries/apollo-compiler/src/main/kotlin/com/apollographql/apollo3/compiler/ir/IrType.kt b/libraries/apollo-compiler/src/main/kotlin/com/apollographql/apollo3/compiler/ir/IrType.kt index 77e2ba5e67a..0913900970e 100644 --- a/libraries/apollo-compiler/src/main/kotlin/com/apollographql/apollo3/compiler/ir/IrType.kt +++ b/libraries/apollo-compiler/src/main/kotlin/com/apollographql/apollo3/compiler/ir/IrType.kt @@ -43,15 +43,48 @@ import kotlinx.serialization.Serializable */ @Serializable sealed interface IrType { + /** + * This type is nullable in Kotlin + */ val nullable: Boolean + + /** + * This type is optional in Kotlin + */ val optional: Boolean - fun copyWith(nullable: Boolean = this.nullable, optional: Boolean = this.optional): IrType + /** + * reading this type must catch exceptions during parsing + */ + val catchTo: IrCatchTo + + /** + * This type may be an error + * true if the type is nullable in the server schema. + * Used to generate error aware adapters + */ + val maybeError: Boolean + + fun copyWith( + maybeError: Boolean = this.maybeError, + nullable: Boolean = this.nullable, + optional: Boolean = this.optional, + catchTo: IrCatchTo = this.catchTo, + ): IrType fun rawType(): IrNamedType } +@Serializable +enum class IrCatchTo { + Null, + Result, + NoCatch +} + fun IrType.nullable(nullable: Boolean): IrType = copyWith(nullable = nullable) fun IrType.optional(optional: Boolean): IrType = copyWith(optional = optional) +fun IrType.catchTo(catchTo: IrCatchTo): IrType = copyWith(catchTo = catchTo) +fun IrType.maybeError(maybeError: Boolean): IrType = copyWith(maybeError = maybeError) @Serializable @SerialName("list") @@ -59,8 +92,10 @@ data class IrListType( val ofType: IrType, override val nullable: Boolean = false, override val optional: Boolean = false, + override val catchTo: IrCatchTo = IrCatchTo.NoCatch, + override val maybeError: Boolean = false, ) : IrType { - override fun copyWith(nullable: Boolean, optional: Boolean): IrType = copy(nullable = nullable, optional = optional) + override fun copyWith(maybeError: Boolean, nullable: Boolean, optional: Boolean, catchTo: IrCatchTo): IrType = copy(nullable = nullable, optional = optional, catchTo = catchTo, maybeError = maybeError) override fun rawType() = ofType.rawType() } @@ -77,8 +112,10 @@ data class IrScalarType( override val name: String, override val nullable: Boolean = false, override val optional: Boolean = false, + override val catchTo: IrCatchTo = IrCatchTo.NoCatch, + override val maybeError: Boolean = false, ) : IrNamedType { - override fun copyWith(nullable: Boolean, optional: Boolean): IrType = copy(nullable = nullable, optional = optional) + override fun copyWith(maybeError: Boolean, nullable: Boolean, optional: Boolean, catchTo: IrCatchTo): IrType = copy(nullable = nullable, optional = optional, catchTo = catchTo, maybeError = maybeError) override fun rawType() = this } @@ -88,8 +125,10 @@ data class IrInputObjectType( override val name: String, override val nullable: Boolean = false, override val optional: Boolean = false, + override val catchTo: IrCatchTo = IrCatchTo.NoCatch, + override val maybeError: Boolean = false, ) : IrNamedType { - override fun copyWith(nullable: Boolean, optional: Boolean): IrType = copy(nullable = nullable, optional = optional) + override fun copyWith(maybeError: Boolean, nullable: Boolean, optional: Boolean, catchTo: IrCatchTo): IrType = copy(nullable = nullable, optional = optional, catchTo = catchTo, maybeError = maybeError) override fun rawType() = this } @@ -99,8 +138,10 @@ data class IrEnumType( override val name: String, override val nullable: Boolean = false, override val optional: Boolean = false, + override val catchTo: IrCatchTo = IrCatchTo.NoCatch, + override val maybeError: Boolean = false, ) : IrNamedType { - override fun copyWith(nullable: Boolean, optional: Boolean): IrType = copy(nullable = nullable, optional = optional) + override fun copyWith(maybeError: Boolean, nullable: Boolean, optional: Boolean, catchTo: IrCatchTo): IrType = copy(nullable = nullable, optional = optional, catchTo = catchTo, maybeError = maybeError) override fun rawType() = this } @@ -110,8 +151,10 @@ data class IrObjectType( override val name: String, override val nullable: Boolean = false, override val optional: Boolean = false, + override val catchTo: IrCatchTo = IrCatchTo.NoCatch, + override val maybeError: Boolean = false, ) : IrNamedType { - override fun copyWith(nullable: Boolean, optional: Boolean): IrType = copy(nullable = nullable, optional = optional) + override fun copyWith(maybeError: Boolean, nullable: Boolean, optional: Boolean, catchTo: IrCatchTo): IrType = copy(nullable = nullable, optional = optional, catchTo = catchTo, maybeError = maybeError) override fun rawType() = this } @@ -140,11 +183,13 @@ internal data class IrModelType( val path: String, override val nullable: Boolean = false, override val optional: Boolean = false, + override val catchTo: IrCatchTo = IrCatchTo.NoCatch, + override val maybeError: Boolean = false, ) : IrNamedType { override val name: String get() = path - override fun copyWith(nullable: Boolean, optional: Boolean): IrType = copy(nullable = nullable, optional = optional) + override fun copyWith(maybeError: Boolean, nullable: Boolean, optional: Boolean, catchTo: IrCatchTo): IrType = copy(nullable = nullable, optional = optional, catchTo = catchTo, maybeError = maybeError) override fun rawType() = this } @@ -163,32 +208,32 @@ internal fun IrType.replacePlaceholder(newPath: String): IrType { internal fun GQLType.toIr(schema: Schema): IrType { return when (this) { - is GQLNonNullType -> type.toIr(schema).copyWith(nullable = false) - is GQLListType -> IrListType(ofType = type.toIr(schema), nullable = true) + is GQLNonNullType -> type.toIr(schema).copyWith(nullable = false, maybeError = false) + is GQLListType -> IrListType(ofType = type.toIr(schema), nullable = true, maybeError = schema.errorAware) is GQLNamedType -> { when (schema.typeDefinition(name)) { is GQLScalarTypeDefinition -> { - IrScalarType(name, nullable = true) + IrScalarType(name, nullable = true, maybeError = schema.errorAware) } is GQLEnumTypeDefinition -> { - IrEnumType(name, nullable = true) + IrEnumType(name, nullable = true, maybeError = schema.errorAware) } is GQLInputObjectTypeDefinition -> { - IrInputObjectType(name, nullable = true) + IrInputObjectType(name, nullable = true, maybeError = schema.errorAware) } is GQLObjectTypeDefinition -> { - IrModelType(MODEL_UNKNOWN, nullable = true) + IrModelType(MODEL_UNKNOWN, nullable = true, maybeError = schema.errorAware) } is GQLInterfaceTypeDefinition -> { - IrModelType(MODEL_UNKNOWN, nullable = true) + IrModelType(MODEL_UNKNOWN, nullable = true, maybeError = schema.errorAware) } is GQLUnionTypeDefinition -> { - IrModelType(MODEL_UNKNOWN, nullable = true) + IrModelType(MODEL_UNKNOWN, nullable = true, maybeError = schema.errorAware) } } } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/antlr_tokens/java/operationBased/antlr_tokens/TestQuery.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/antlr_tokens/java/operationBased/antlr_tokens/TestQuery.java.expected index 49574193c04..a0ce87b1899 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/antlr_tokens/java/operationBased/antlr_tokens/TestQuery.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/antlr_tokens/java/operationBased/antlr_tokens/TestQuery.java.expected @@ -125,6 +125,11 @@ public class TestQuery implements Query { .build(); } + @Override + public boolean getIgnoreErrors() { + return false; + } + public static final class Builder { private Optional operation = Optional.absent(); diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/antlr_tokens/kotlin/responseBased/antlr_tokens/TestQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/antlr_tokens/kotlin/responseBased/antlr_tokens/TestQuery.kt.expected index d8c366a199d..2dbad4f9ccb 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/antlr_tokens/kotlin/responseBased/antlr_tokens/TestQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/antlr_tokens/kotlin/responseBased/antlr_tokens/TestQuery.kt.expected @@ -23,6 +23,8 @@ import com.example.antlr_tokens.type.Query as CompiledQuery public data class TestQuery( public val operation: Optional = Optional.Absent, ) : Query { + override val ignoreErrors: Boolean = false + override fun id(): String = OPERATION_ID override fun document(): String = OPERATION_DOCUMENT diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/arguments_hardcoded/java/operationBased/arguments_hardcoded/TestQuery.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/arguments_hardcoded/java/operationBased/arguments_hardcoded/TestQuery.java.expected index 5dfe8617d61..d7b312c9aa2 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/arguments_hardcoded/java/operationBased/arguments_hardcoded/TestQuery.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/arguments_hardcoded/java/operationBased/arguments_hardcoded/TestQuery.java.expected @@ -119,6 +119,11 @@ public class TestQuery implements Query { .build(); } + @Override + public boolean getIgnoreErrors() { + return false; + } + public static final class Builder { Builder() { } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/arguments_hardcoded/kotlin/responseBased/arguments_hardcoded/TestQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/arguments_hardcoded/kotlin/responseBased/arguments_hardcoded/TestQuery.kt.expected index b209697d94d..5b06972723f 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/arguments_hardcoded/kotlin/responseBased/arguments_hardcoded/TestQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/arguments_hardcoded/kotlin/responseBased/arguments_hardcoded/TestQuery.kt.expected @@ -22,6 +22,8 @@ import kotlin.collections.List import com.example.arguments_hardcoded.type.Query as CompiledQuery public class TestQuery() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/big_query/kotlin/responseBased/big_query/TestQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/big_query/kotlin/responseBased/big_query/TestQuery.kt.expected index 50ec55d3a69..82f135defa8 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/big_query/kotlin/responseBased/big_query/TestQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/big_query/kotlin/responseBased/big_query/TestQuery.kt.expected @@ -21,6 +21,8 @@ import kotlin.String import com.example.big_query.type.Query as CompiledQuery public class TestQuery() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/capitalized_fields/java/operationBased/capitalized_fields/TestQuery.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/capitalized_fields/java/operationBased/capitalized_fields/TestQuery.java.expected index 4c8008ba087..867f458bfe2 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/capitalized_fields/java/operationBased/capitalized_fields/TestQuery.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/capitalized_fields/java/operationBased/capitalized_fields/TestQuery.java.expected @@ -121,6 +121,11 @@ public class TestQuery implements Query { .build(); } + @Override + public boolean getIgnoreErrors() { + return false; + } + public static final class Builder { Builder() { } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/capitalized_fields/kotlin/operationBased/capitalized_fields/TestQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/capitalized_fields/kotlin/operationBased/capitalized_fields/TestQuery.kt.expected index 23cc61acd94..09f85a8ead3 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/capitalized_fields/kotlin/operationBased/capitalized_fields/TestQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/capitalized_fields/kotlin/operationBased/capitalized_fields/TestQuery.kt.expected @@ -21,6 +21,8 @@ import kotlin.String import com.example.capitalized_fields.type.Query as CompiledQuery public class TestQuery() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/capitalized_fields/kotlin/responseBased/capitalized_fields/TestQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/capitalized_fields/kotlin/responseBased/capitalized_fields/TestQuery.kt.expected index 7a0eab4c028..88b3a46410a 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/capitalized_fields/kotlin/responseBased/capitalized_fields/TestQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/capitalized_fields/kotlin/responseBased/capitalized_fields/TestQuery.kt.expected @@ -21,6 +21,8 @@ import kotlin.String import com.example.capitalized_fields.type.Query as CompiledQuery public class TestQuery() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/case_sensitive_enum/java/operationBased/case_sensitive_enum/TestQuery.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/case_sensitive_enum/java/operationBased/case_sensitive_enum/TestQuery.java.expected index 5ebbd5cb804..48471f7e070 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/case_sensitive_enum/java/operationBased/case_sensitive_enum/TestQuery.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/case_sensitive_enum/java/operationBased/case_sensitive_enum/TestQuery.java.expected @@ -114,6 +114,11 @@ public class TestQuery implements Query { .build(); } + @Override + public boolean getIgnoreErrors() { + return false; + } + public static final class Builder { Builder() { } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/case_sensitive_enum/kotlin/responseBased/case_sensitive_enum/TestQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/case_sensitive_enum/kotlin/responseBased/case_sensitive_enum/TestQuery.kt.expected index 3a40d4dd161..920f18188e0 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/case_sensitive_enum/kotlin/responseBased/case_sensitive_enum/TestQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/case_sensitive_enum/kotlin/responseBased/case_sensitive_enum/TestQuery.kt.expected @@ -22,6 +22,8 @@ import kotlin.String import com.example.case_sensitive_enum.type.Query as CompiledQuery public class TestQuery() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/companion/java/operationBased/companion/TestQuery.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/companion/java/operationBased/companion/TestQuery.java.expected index 83d7a8a8ae4..8214972e0a8 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/companion/java/operationBased/companion/TestQuery.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/companion/java/operationBased/companion/TestQuery.java.expected @@ -116,6 +116,11 @@ public class TestQuery implements Query { .build(); } + @Override + public boolean getIgnoreErrors() { + return false; + } + public static final class Builder { Builder() { } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/companion/kotlin/operationBased/companion/TestQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/companion/kotlin/operationBased/companion/TestQuery.kt.expected index 0c9fc36d0de..3c4e7646eb2 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/companion/kotlin/operationBased/companion/TestQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/companion/kotlin/operationBased/companion/TestQuery.kt.expected @@ -21,6 +21,8 @@ import kotlin.String import com.example.`companion`.type.Query as CompiledQuery public class TestQuery() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/custom_scalar_type/java/operationBased/custom_scalar_type/TestQuery.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/custom_scalar_type/java/operationBased/custom_scalar_type/TestQuery.java.expected index ca725775f71..3ed8ce636e9 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/custom_scalar_type/java/operationBased/custom_scalar_type/TestQuery.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/custom_scalar_type/java/operationBased/custom_scalar_type/TestQuery.java.expected @@ -124,6 +124,11 @@ public class TestQuery implements Query { .build(); } + @Override + public boolean getIgnoreErrors() { + return false; + } + public static final class Builder { Builder() { } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/custom_scalar_type/kotlin/responseBased/custom_scalar_type/TestQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/custom_scalar_type/kotlin/responseBased/custom_scalar_type/TestQuery.kt.expected index 2690e1397f8..22d23411653 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/custom_scalar_type/kotlin/responseBased/custom_scalar_type/TestQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/custom_scalar_type/kotlin/responseBased/custom_scalar_type/TestQuery.kt.expected @@ -24,6 +24,8 @@ import kotlin.collections.List import com.example.custom_scalar_type.type.Query as CompiledQuery public class TestQuery() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/data_builders/java/operationBased/data_builders/AnimalQuery.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/data_builders/java/operationBased/data_builders/AnimalQuery.java.expected index 0824e2fc55b..6f0e308b530 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/data_builders/java/operationBased/data_builders/AnimalQuery.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/data_builders/java/operationBased/data_builders/AnimalQuery.java.expected @@ -147,6 +147,11 @@ public class AnimalQuery implements Query { return buildData(map, new DefaultFakeResolver(__Schema.types)); } + @Override + public boolean getIgnoreErrors() { + return false; + } + public static final class Builder { Builder() { } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/data_builders/java/operationBased/data_builders/CharacterQuery.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/data_builders/java/operationBased/data_builders/CharacterQuery.java.expected index ba0e9d21cd5..a1974ac1553 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/data_builders/java/operationBased/data_builders/CharacterQuery.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/data_builders/java/operationBased/data_builders/CharacterQuery.java.expected @@ -149,6 +149,11 @@ public class CharacterQuery implements Query { return buildData(map, new DefaultFakeResolver(__Schema.types)); } + @Override + public boolean getIgnoreErrors() { + return false; + } + public static final class Builder { Builder() { } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/data_builders/java/operationBased/data_builders/NodeQuery.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/data_builders/java/operationBased/data_builders/NodeQuery.java.expected index 109751d0959..3fd585b504c 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/data_builders/java/operationBased/data_builders/NodeQuery.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/data_builders/java/operationBased/data_builders/NodeQuery.java.expected @@ -148,6 +148,11 @@ public class NodeQuery implements Query { return buildData(map, new DefaultFakeResolver(__Schema.types)); } + @Override + public boolean getIgnoreErrors() { + return false; + } + public static final class Builder { Builder() { } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/data_builders/java/operationBased/data_builders/fragment/CatFragmentImpl.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/data_builders/java/operationBased/data_builders/fragment/CatFragmentImpl.java.expected index f2d866ac7ea..12da57a042f 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/data_builders/java/operationBased/data_builders/fragment/CatFragmentImpl.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/data_builders/java/operationBased/data_builders/fragment/CatFragmentImpl.java.expected @@ -79,4 +79,9 @@ public class CatFragmentImpl implements Fragment { .selections(CatFragmentSelections.__root) .build(); } + + @Override + public boolean getIgnoreErrors() { + return false; + } } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/data_builders/java/operationBased/data_builders/fragment/DogFragmentImpl.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/data_builders/java/operationBased/data_builders/fragment/DogFragmentImpl.java.expected index 6338fea0fd0..c4f69bfb8c2 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/data_builders/java/operationBased/data_builders/fragment/DogFragmentImpl.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/data_builders/java/operationBased/data_builders/fragment/DogFragmentImpl.java.expected @@ -79,4 +79,9 @@ public class DogFragmentImpl implements Fragment { .selections(DogFragmentSelections.__root) .build(); } + + @Override + public boolean getIgnoreErrors() { + return false; + } } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/data_builders/java/operationBased/data_builders/fragment/DroidFragmentImpl.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/data_builders/java/operationBased/data_builders/fragment/DroidFragmentImpl.java.expected index de41b0a6ab7..424ca6a8219 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/data_builders/java/operationBased/data_builders/fragment/DroidFragmentImpl.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/data_builders/java/operationBased/data_builders/fragment/DroidFragmentImpl.java.expected @@ -79,4 +79,9 @@ public class DroidFragmentImpl implements Fragment { .selections(DroidFragmentSelections.__root) .build(); } + + @Override + public boolean getIgnoreErrors() { + return false; + } } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/data_builders/java/operationBased/data_builders/fragment/HumanFragmentImpl.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/data_builders/java/operationBased/data_builders/fragment/HumanFragmentImpl.java.expected index 9523ed5d450..6cd6a7c7775 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/data_builders/java/operationBased/data_builders/fragment/HumanFragmentImpl.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/data_builders/java/operationBased/data_builders/fragment/HumanFragmentImpl.java.expected @@ -79,4 +79,9 @@ public class HumanFragmentImpl implements Fragment { .selections(HumanFragmentSelections.__root) .build(); } + + @Override + public boolean getIgnoreErrors() { + return false; + } } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/data_builders/kotlin/operationBased/data_builders/AnimalQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/data_builders/kotlin/operationBased/data_builders/AnimalQuery.kt.expected index 1e1005a682a..69b655737f1 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/data_builders/kotlin/operationBased/data_builders/AnimalQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/data_builders/kotlin/operationBased/data_builders/AnimalQuery.kt.expected @@ -30,6 +30,8 @@ import kotlin.Unit import com.example.data_builders.type.Query as CompiledQuery public class AnimalQuery() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/data_builders/kotlin/operationBased/data_builders/CharacterQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/data_builders/kotlin/operationBased/data_builders/CharacterQuery.kt.expected index 1ba9a3b2654..2c124574549 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/data_builders/kotlin/operationBased/data_builders/CharacterQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/data_builders/kotlin/operationBased/data_builders/CharacterQuery.kt.expected @@ -30,6 +30,8 @@ import kotlin.Unit import com.example.data_builders.type.Query as CompiledQuery public class CharacterQuery() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/data_builders/kotlin/operationBased/data_builders/NodeQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/data_builders/kotlin/operationBased/data_builders/NodeQuery.kt.expected index 59961026fd4..2ac82298a74 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/data_builders/kotlin/operationBased/data_builders/NodeQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/data_builders/kotlin/operationBased/data_builders/NodeQuery.kt.expected @@ -30,6 +30,8 @@ import kotlin.Unit import com.example.data_builders.type.Query as CompiledQuery public class NodeQuery() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/data_builders/kotlin/operationBased/data_builders/fragment/CatFragmentImpl.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/data_builders/kotlin/operationBased/data_builders/fragment/CatFragmentImpl.kt.expected index 1fe684d17c3..ce4ab4ecd7a 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/data_builders/kotlin/operationBased/data_builders/fragment/CatFragmentImpl.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/data_builders/kotlin/operationBased/data_builders/fragment/CatFragmentImpl.kt.expected @@ -25,6 +25,8 @@ import kotlin.Int import kotlin.Unit public class CatFragmentImpl() : Fragment { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/data_builders/kotlin/operationBased/data_builders/fragment/DogFragmentImpl.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/data_builders/kotlin/operationBased/data_builders/fragment/DogFragmentImpl.kt.expected index 5f8ac1fc856..56b8575bad6 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/data_builders/kotlin/operationBased/data_builders/fragment/DogFragmentImpl.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/data_builders/kotlin/operationBased/data_builders/fragment/DogFragmentImpl.kt.expected @@ -25,6 +25,8 @@ import kotlin.Int import kotlin.Unit public class DogFragmentImpl() : Fragment { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/data_builders/kotlin/operationBased/data_builders/fragment/DroidFragmentImpl.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/data_builders/kotlin/operationBased/data_builders/fragment/DroidFragmentImpl.kt.expected index 93b18028d74..6d15745fea4 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/data_builders/kotlin/operationBased/data_builders/fragment/DroidFragmentImpl.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/data_builders/kotlin/operationBased/data_builders/fragment/DroidFragmentImpl.kt.expected @@ -25,6 +25,8 @@ import kotlin.Int import kotlin.Unit public class DroidFragmentImpl() : Fragment { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/data_builders/kotlin/operationBased/data_builders/fragment/HumanFragmentImpl.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/data_builders/kotlin/operationBased/data_builders/fragment/HumanFragmentImpl.kt.expected index d50778c9b22..04e0c5fc71e 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/data_builders/kotlin/operationBased/data_builders/fragment/HumanFragmentImpl.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/data_builders/kotlin/operationBased/data_builders/fragment/HumanFragmentImpl.kt.expected @@ -25,6 +25,8 @@ import kotlin.Int import kotlin.Unit public class HumanFragmentImpl() : Fragment { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/data_builders/kotlin/responseBased/data_builders/AnimalQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/data_builders/kotlin/responseBased/data_builders/AnimalQuery.kt.expected index 3f13c45e839..6ddf2f30718 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/data_builders/kotlin/responseBased/data_builders/AnimalQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/data_builders/kotlin/responseBased/data_builders/AnimalQuery.kt.expected @@ -31,6 +31,8 @@ import kotlin.Unit import com.example.data_builders.type.Query as CompiledQuery public class AnimalQuery() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/data_builders/kotlin/responseBased/data_builders/CharacterQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/data_builders/kotlin/responseBased/data_builders/CharacterQuery.kt.expected index 76a31ac3efb..f9ab04c7494 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/data_builders/kotlin/responseBased/data_builders/CharacterQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/data_builders/kotlin/responseBased/data_builders/CharacterQuery.kt.expected @@ -31,6 +31,8 @@ import kotlin.Unit import com.example.data_builders.type.Query as CompiledQuery public class CharacterQuery() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/data_builders/kotlin/responseBased/data_builders/NodeQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/data_builders/kotlin/responseBased/data_builders/NodeQuery.kt.expected index 230b94b80ef..31ee35a510e 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/data_builders/kotlin/responseBased/data_builders/NodeQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/data_builders/kotlin/responseBased/data_builders/NodeQuery.kt.expected @@ -31,6 +31,8 @@ import kotlin.Unit import com.example.data_builders.type.Query as CompiledQuery public class NodeQuery() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/data_builders/kotlin/responseBased/data_builders/fragment/CatFragmentImpl.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/data_builders/kotlin/responseBased/data_builders/fragment/CatFragmentImpl.kt.expected index a88b0cbbc5f..0e1f89af0a1 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/data_builders/kotlin/responseBased/data_builders/fragment/CatFragmentImpl.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/data_builders/kotlin/responseBased/data_builders/fragment/CatFragmentImpl.kt.expected @@ -26,6 +26,8 @@ import kotlin.String import kotlin.Unit public class CatFragmentImpl() : Fragment { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/data_builders/kotlin/responseBased/data_builders/fragment/DogFragmentImpl.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/data_builders/kotlin/responseBased/data_builders/fragment/DogFragmentImpl.kt.expected index 033c863215b..dc57cbbe0d2 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/data_builders/kotlin/responseBased/data_builders/fragment/DogFragmentImpl.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/data_builders/kotlin/responseBased/data_builders/fragment/DogFragmentImpl.kt.expected @@ -26,6 +26,8 @@ import kotlin.String import kotlin.Unit public class DogFragmentImpl() : Fragment { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/data_builders/kotlin/responseBased/data_builders/fragment/DroidFragmentImpl.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/data_builders/kotlin/responseBased/data_builders/fragment/DroidFragmentImpl.kt.expected index 72e8e9270ba..3b4533eb10a 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/data_builders/kotlin/responseBased/data_builders/fragment/DroidFragmentImpl.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/data_builders/kotlin/responseBased/data_builders/fragment/DroidFragmentImpl.kt.expected @@ -26,6 +26,8 @@ import kotlin.String import kotlin.Unit public class DroidFragmentImpl() : Fragment { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/data_builders/kotlin/responseBased/data_builders/fragment/HumanFragmentImpl.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/data_builders/kotlin/responseBased/data_builders/fragment/HumanFragmentImpl.kt.expected index ee28de88738..d49d44ec8af 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/data_builders/kotlin/responseBased/data_builders/fragment/HumanFragmentImpl.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/data_builders/kotlin/responseBased/data_builders/fragment/HumanFragmentImpl.kt.expected @@ -26,6 +26,8 @@ import kotlin.String import kotlin.Unit public class HumanFragmentImpl() : Fragment { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/decapitalized_fields/java/operationBased/decapitalized_fields/TestQuery.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/decapitalized_fields/java/operationBased/decapitalized_fields/TestQuery.java.expected index 2697619497c..bd12ea9ad92 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/decapitalized_fields/java/operationBased/decapitalized_fields/TestQuery.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/decapitalized_fields/java/operationBased/decapitalized_fields/TestQuery.java.expected @@ -129,6 +129,11 @@ public class TestQuery implements Query { .build(); } + @Override + public boolean getIgnoreErrors() { + return false; + } + public static final class Builder { Builder() { } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/decapitalized_fields/java/operationBased/decapitalized_fields/fragment/HorseFragmentImpl.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/decapitalized_fields/java/operationBased/decapitalized_fields/fragment/HorseFragmentImpl.java.expected index 828778e4e14..94c6553f888 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/decapitalized_fields/java/operationBased/decapitalized_fields/fragment/HorseFragmentImpl.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/decapitalized_fields/java/operationBased/decapitalized_fields/fragment/HorseFragmentImpl.java.expected @@ -79,4 +79,9 @@ public class HorseFragmentImpl implements Fragment { .selections(HorseFragmentSelections.__root) .build(); } + + @Override + public boolean getIgnoreErrors() { + return false; + } } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/decapitalized_fields/kotlin/operationBased/decapitalized_fields/TestQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/decapitalized_fields/kotlin/operationBased/decapitalized_fields/TestQuery.kt.expected index 28b57c802e0..7b9ab1c99b0 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/decapitalized_fields/kotlin/operationBased/decapitalized_fields/TestQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/decapitalized_fields/kotlin/operationBased/decapitalized_fields/TestQuery.kt.expected @@ -22,6 +22,8 @@ import kotlin.String import com.example.decapitalized_fields.type.Query as CompiledQuery public class TestQuery() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/decapitalized_fields/kotlin/operationBased/decapitalized_fields/fragment/HorseFragmentImpl.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/decapitalized_fields/kotlin/operationBased/decapitalized_fields/fragment/HorseFragmentImpl.kt.expected index d016bfaaad9..35d009d3faa 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/decapitalized_fields/kotlin/operationBased/decapitalized_fields/fragment/HorseFragmentImpl.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/decapitalized_fields/kotlin/operationBased/decapitalized_fields/fragment/HorseFragmentImpl.kt.expected @@ -18,6 +18,8 @@ import kotlin.Boolean import kotlin.Int public class HorseFragmentImpl() : Fragment { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/decapitalized_fields/kotlin/responseBased/decapitalized_fields/TestQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/decapitalized_fields/kotlin/responseBased/decapitalized_fields/TestQuery.kt.expected index b66543ae818..9fc5e5328c2 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/decapitalized_fields/kotlin/responseBased/decapitalized_fields/TestQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/decapitalized_fields/kotlin/responseBased/decapitalized_fields/TestQuery.kt.expected @@ -23,6 +23,8 @@ import kotlin.Suppress import com.example.decapitalized_fields.type.Query as CompiledQuery public class TestQuery() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/decapitalized_fields/kotlin/responseBased/decapitalized_fields/fragment/HorseFragmentImpl.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/decapitalized_fields/kotlin/responseBased/decapitalized_fields/fragment/HorseFragmentImpl.kt.expected index 6985a655ace..2d3d5156fe3 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/decapitalized_fields/kotlin/responseBased/decapitalized_fields/fragment/HorseFragmentImpl.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/decapitalized_fields/kotlin/responseBased/decapitalized_fields/fragment/HorseFragmentImpl.kt.expected @@ -19,6 +19,8 @@ import kotlin.Int import kotlin.String public class HorseFragmentImpl() : Fragment { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/deprecated_merged_field/java/operationBased/deprecated_merged_field/CatQuery.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/deprecated_merged_field/java/operationBased/deprecated_merged_field/CatQuery.java.expected index 7c5b729d3f1..06b582700c5 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/deprecated_merged_field/java/operationBased/deprecated_merged_field/CatQuery.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/deprecated_merged_field/java/operationBased/deprecated_merged_field/CatQuery.java.expected @@ -127,6 +127,11 @@ public class CatQuery implements Query { .build(); } + @Override + public boolean getIgnoreErrors() { + return false; + } + public static final class Builder { Builder() { } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/deprecated_merged_field/java/operationBased/deprecated_merged_field/fragment/AnimalFragmentImpl.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/deprecated_merged_field/java/operationBased/deprecated_merged_field/fragment/AnimalFragmentImpl.java.expected index 7cf031f8b0c..a562d4135cc 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/deprecated_merged_field/java/operationBased/deprecated_merged_field/fragment/AnimalFragmentImpl.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/deprecated_merged_field/java/operationBased/deprecated_merged_field/fragment/AnimalFragmentImpl.java.expected @@ -79,4 +79,9 @@ public class AnimalFragmentImpl implements Fragment { .selections(AnimalFragmentSelections.__root) .build(); } + + @Override + public boolean getIgnoreErrors() { + return false; + } } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/deprecated_merged_field/kotlin/operationBased/deprecated_merged_field/CatQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/deprecated_merged_field/kotlin/operationBased/deprecated_merged_field/CatQuery.kt.expected index d3195564d2e..20e8ab2f67b 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/deprecated_merged_field/kotlin/operationBased/deprecated_merged_field/CatQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/deprecated_merged_field/kotlin/operationBased/deprecated_merged_field/CatQuery.kt.expected @@ -22,6 +22,8 @@ import kotlin.String import com.example.deprecated_merged_field.type.Query as CompiledQuery public class CatQuery() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/deprecated_merged_field/kotlin/operationBased/deprecated_merged_field/fragment/AnimalFragmentImpl.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/deprecated_merged_field/kotlin/operationBased/deprecated_merged_field/fragment/AnimalFragmentImpl.kt.expected index 30b367b8105..216179de924 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/deprecated_merged_field/kotlin/operationBased/deprecated_merged_field/fragment/AnimalFragmentImpl.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/deprecated_merged_field/kotlin/operationBased/deprecated_merged_field/fragment/AnimalFragmentImpl.kt.expected @@ -18,6 +18,8 @@ import kotlin.Boolean import kotlin.Int public class AnimalFragmentImpl() : Fragment { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/deprecated_merged_field/kotlin/responseBased/deprecated_merged_field/CatQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/deprecated_merged_field/kotlin/responseBased/deprecated_merged_field/CatQuery.kt.expected index 3a1e89e8446..25b02dd68c2 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/deprecated_merged_field/kotlin/responseBased/deprecated_merged_field/CatQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/deprecated_merged_field/kotlin/responseBased/deprecated_merged_field/CatQuery.kt.expected @@ -26,6 +26,8 @@ import kotlin.Suppress import com.example.deprecated_merged_field.type.Query as CompiledQuery public class CatQuery() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/deprecated_merged_field/kotlin/responseBased/deprecated_merged_field/fragment/AnimalFragmentImpl.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/deprecated_merged_field/kotlin/responseBased/deprecated_merged_field/fragment/AnimalFragmentImpl.kt.expected index 96a343980a8..620f2f0e436 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/deprecated_merged_field/kotlin/responseBased/deprecated_merged_field/fragment/AnimalFragmentImpl.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/deprecated_merged_field/kotlin/responseBased/deprecated_merged_field/fragment/AnimalFragmentImpl.kt.expected @@ -21,6 +21,8 @@ import kotlin.String import kotlin.Suppress public class AnimalFragmentImpl() : Fragment { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/deprecation/java/operationBased/deprecation/TestQuery.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/deprecation/java/operationBased/deprecation/TestQuery.java.expected index 539c54463a2..7ba01456930 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/deprecation/java/operationBased/deprecation/TestQuery.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/deprecation/java/operationBased/deprecation/TestQuery.java.expected @@ -128,6 +128,11 @@ public class TestQuery implements Query { .build(); } + @Override + public boolean getIgnoreErrors() { + return false; + } + public static final class Builder { private Optional episode = Optional.absent(); diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/deprecation/kotlin/responseBased/deprecation/TestQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/deprecation/kotlin/responseBased/deprecation/TestQuery.kt.expected index cc0db280951..4d7310a57a7 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/deprecation/kotlin/responseBased/deprecation/TestQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/deprecation/kotlin/responseBased/deprecation/TestQuery.kt.expected @@ -25,6 +25,8 @@ import com.example.deprecation.type.Query as CompiledQuery public data class TestQuery( public val episode: Optional = Optional.Absent, ) : Query { + override val ignoreErrors: Boolean = false + override fun id(): String = OPERATION_ID override fun document(): String = OPERATION_DOCUMENT diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/enum_field/java/operationBased/enum_field/TestQuery.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/enum_field/java/operationBased/enum_field/TestQuery.java.expected index 445f83fc79b..036c0fd3970 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/enum_field/java/operationBased/enum_field/TestQuery.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/enum_field/java/operationBased/enum_field/TestQuery.java.expected @@ -116,6 +116,11 @@ public class TestQuery implements Query { .build(); } + @Override + public boolean getIgnoreErrors() { + return false; + } + public static final class Builder { Builder() { } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/enum_field/kotlin/responseBased/enum_field/TestQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/enum_field/kotlin/responseBased/enum_field/TestQuery.kt.expected index 6745a544d8f..16770b2eac0 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/enum_field/kotlin/responseBased/enum_field/TestQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/enum_field/kotlin/responseBased/enum_field/TestQuery.kt.expected @@ -23,6 +23,8 @@ import kotlin.String import com.example.enum_field.type.Query as CompiledQuery public class TestQuery() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/enums_as_sealed/java/operationBased/enums_as_sealed/TestQuery.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/enums_as_sealed/java/operationBased/enums_as_sealed/TestQuery.java.expected index be4873fccab..6dab214ca55 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/enums_as_sealed/java/operationBased/enums_as_sealed/TestQuery.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/enums_as_sealed/java/operationBased/enums_as_sealed/TestQuery.java.expected @@ -114,6 +114,11 @@ public class TestQuery implements Query { .build(); } + @Override + public boolean getIgnoreErrors() { + return false; + } + public static final class Builder { Builder() { } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/enums_as_sealed/kotlin/responseBased/enums_as_sealed/TestQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/enums_as_sealed/kotlin/responseBased/enums_as_sealed/TestQuery.kt.expected index 05d7d7ec531..901c423e412 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/enums_as_sealed/kotlin/responseBased/enums_as_sealed/TestQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/enums_as_sealed/kotlin/responseBased/enums_as_sealed/TestQuery.kt.expected @@ -22,6 +22,8 @@ import kotlin.String import com.example.enums_as_sealed.type.Query as CompiledQuery public class TestQuery() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/field_with_include_directive/java/operationBased/field_with_include_directive/TestQuery.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/field_with_include_directive/java/operationBased/field_with_include_directive/TestQuery.java.expected index ccf62c11fea..8d2beb47d28 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/field_with_include_directive/java/operationBased/field_with_include_directive/TestQuery.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/field_with_include_directive/java/operationBased/field_with_include_directive/TestQuery.java.expected @@ -134,6 +134,11 @@ public class TestQuery implements Query { .build(); } + @Override + public boolean getIgnoreErrors() { + return false; + } + public static final class Builder { private Boolean includeName; diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/field_with_include_directive/kotlin/responseBased/field_with_include_directive/TestQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/field_with_include_directive/kotlin/responseBased/field_with_include_directive/TestQuery.kt.expected index 5f620cc2311..eac8a7410a7 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/field_with_include_directive/kotlin/responseBased/field_with_include_directive/TestQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/field_with_include_directive/kotlin/responseBased/field_with_include_directive/TestQuery.kt.expected @@ -24,6 +24,8 @@ public data class TestQuery( public val includeName: Boolean, public val skipFriends: Boolean, ) : Query { + override val ignoreErrors: Boolean = false + override fun id(): String = OPERATION_ID override fun document(): String = OPERATION_DOCUMENT diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/fieldset_with_multiple_super/java/operationBased/fieldset_with_multiple_super/TestQuery.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/fieldset_with_multiple_super/java/operationBased/fieldset_with_multiple_super/TestQuery.java.expected index eccd6a6f799..e226cffca46 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/fieldset_with_multiple_super/java/operationBased/fieldset_with_multiple_super/TestQuery.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/fieldset_with_multiple_super/java/operationBased/fieldset_with_multiple_super/TestQuery.java.expected @@ -129,6 +129,11 @@ public class TestQuery implements Query { .build(); } + @Override + public boolean getIgnoreErrors() { + return false; + } + public static final class Builder { Builder() { } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/fieldset_with_multiple_super/kotlin/operationBased/fieldset_with_multiple_super/TestQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/fieldset_with_multiple_super/kotlin/operationBased/fieldset_with_multiple_super/TestQuery.kt.expected index 7cbfd9018eb..cc7d886a518 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/fieldset_with_multiple_super/kotlin/operationBased/fieldset_with_multiple_super/TestQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/fieldset_with_multiple_super/kotlin/operationBased/fieldset_with_multiple_super/TestQuery.kt.expected @@ -21,6 +21,8 @@ import kotlin.String import com.example.fieldset_with_multiple_super.type.Query as CompiledQuery public class TestQuery() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/fieldset_with_multiple_super/kotlin/responseBased/fieldset_with_multiple_super/TestQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/fieldset_with_multiple_super/kotlin/responseBased/fieldset_with_multiple_super/TestQuery.kt.expected index 9e71cad128c..17a25c2405a 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/fieldset_with_multiple_super/kotlin/responseBased/fieldset_with_multiple_super/TestQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/fieldset_with_multiple_super/kotlin/responseBased/fieldset_with_multiple_super/TestQuery.kt.expected @@ -22,6 +22,8 @@ import kotlin.Suppress import com.example.fieldset_with_multiple_super.type.Query as CompiledQuery public class TestQuery() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/fragment_spread_with_include_directive/java/operationBased/fragment_spread_with_include_directive/TestQuery.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/fragment_spread_with_include_directive/java/operationBased/fragment_spread_with_include_directive/TestQuery.java.expected index 422312b7700..10fd4f1969f 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/fragment_spread_with_include_directive/java/operationBased/fragment_spread_with_include_directive/TestQuery.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/fragment_spread_with_include_directive/java/operationBased/fragment_spread_with_include_directive/TestQuery.java.expected @@ -180,6 +180,11 @@ public class TestQuery implements Query { .build(); } + @Override + public boolean getIgnoreErrors() { + return false; + } + public static final class Builder { private Boolean withDetails; diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/fragment_spread_with_include_directive/java/operationBased/fragment_spread_with_include_directive/fragment/DroidDetailsImpl.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/fragment_spread_with_include_directive/java/operationBased/fragment_spread_with_include_directive/fragment/DroidDetailsImpl.java.expected index afff8f2f4f2..2185d6a35a7 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/fragment_spread_with_include_directive/java/operationBased/fragment_spread_with_include_directive/fragment/DroidDetailsImpl.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/fragment_spread_with_include_directive/java/operationBased/fragment_spread_with_include_directive/fragment/DroidDetailsImpl.java.expected @@ -79,4 +79,9 @@ public class DroidDetailsImpl implements Fragment { .selections(DroidDetailsSelections.__root) .build(); } + + @Override + public boolean getIgnoreErrors() { + return false; + } } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/fragment_spread_with_include_directive/java/operationBased/fragment_spread_with_include_directive/fragment/HeroDetailsImpl.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/fragment_spread_with_include_directive/java/operationBased/fragment_spread_with_include_directive/fragment/HeroDetailsImpl.java.expected index c5c818adf8e..4b735c512ea 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/fragment_spread_with_include_directive/java/operationBased/fragment_spread_with_include_directive/fragment/HeroDetailsImpl.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/fragment_spread_with_include_directive/java/operationBased/fragment_spread_with_include_directive/fragment/HeroDetailsImpl.java.expected @@ -79,4 +79,9 @@ public class HeroDetailsImpl implements Fragment { .selections(HeroDetailsSelections.__root) .build(); } + + @Override + public boolean getIgnoreErrors() { + return false; + } } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/fragment_spread_with_include_directive/java/operationBased/fragment_spread_with_include_directive/fragment/HumanDetailsImpl.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/fragment_spread_with_include_directive/java/operationBased/fragment_spread_with_include_directive/fragment/HumanDetailsImpl.java.expected index e95ed839808..336ed7c480f 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/fragment_spread_with_include_directive/java/operationBased/fragment_spread_with_include_directive/fragment/HumanDetailsImpl.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/fragment_spread_with_include_directive/java/operationBased/fragment_spread_with_include_directive/fragment/HumanDetailsImpl.java.expected @@ -79,4 +79,9 @@ public class HumanDetailsImpl implements Fragment { .selections(HumanDetailsSelections.__root) .build(); } + + @Override + public boolean getIgnoreErrors() { + return false; + } } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/fragment_spread_with_include_directive/java/operationBased/fragment_spread_with_include_directive/fragment/OtherDroidDetailsImpl.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/fragment_spread_with_include_directive/java/operationBased/fragment_spread_with_include_directive/fragment/OtherDroidDetailsImpl.java.expected index 04af773622f..4ba1d95e2a6 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/fragment_spread_with_include_directive/java/operationBased/fragment_spread_with_include_directive/fragment/OtherDroidDetailsImpl.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/fragment_spread_with_include_directive/java/operationBased/fragment_spread_with_include_directive/fragment/OtherDroidDetailsImpl.java.expected @@ -79,4 +79,9 @@ public class OtherDroidDetailsImpl implements Fragment { .selections(OtherDroidDetailsSelections.__root) .build(); } + + @Override + public boolean getIgnoreErrors() { + return false; + } } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/fragment_spread_with_include_directive/kotlin/operationBased/fragment_spread_with_include_directive/TestQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/fragment_spread_with_include_directive/kotlin/operationBased/fragment_spread_with_include_directive/TestQuery.kt.expected index 37f4dcf9a86..29857dd62bc 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/fragment_spread_with_include_directive/kotlin/operationBased/fragment_spread_with_include_directive/TestQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/fragment_spread_with_include_directive/kotlin/operationBased/fragment_spread_with_include_directive/TestQuery.kt.expected @@ -31,6 +31,8 @@ public data class TestQuery( public val optionalWithDefaultTrue: Optional = Optional.Absent, public val optionalWithNoDefault: Optional = Optional.Absent, ) : Query { + override val ignoreErrors: Boolean = false + override fun id(): String = OPERATION_ID override fun document(): String = OPERATION_DOCUMENT diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/fragment_spread_with_include_directive/kotlin/operationBased/fragment_spread_with_include_directive/fragment/DroidDetailsImpl.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/fragment_spread_with_include_directive/kotlin/operationBased/fragment_spread_with_include_directive/fragment/DroidDetailsImpl.kt.expected index 5df6f6d8d03..540cc71965b 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/fragment_spread_with_include_directive/kotlin/operationBased/fragment_spread_with_include_directive/fragment/DroidDetailsImpl.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/fragment_spread_with_include_directive/kotlin/operationBased/fragment_spread_with_include_directive/fragment/DroidDetailsImpl.kt.expected @@ -18,6 +18,8 @@ import kotlin.Boolean import kotlin.Int public class DroidDetailsImpl() : Fragment { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/fragment_spread_with_include_directive/kotlin/operationBased/fragment_spread_with_include_directive/fragment/HeroDetailsImpl.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/fragment_spread_with_include_directive/kotlin/operationBased/fragment_spread_with_include_directive/fragment/HeroDetailsImpl.kt.expected index f0e2a41e0a9..0ca5a25a48e 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/fragment_spread_with_include_directive/kotlin/operationBased/fragment_spread_with_include_directive/fragment/HeroDetailsImpl.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/fragment_spread_with_include_directive/kotlin/operationBased/fragment_spread_with_include_directive/fragment/HeroDetailsImpl.kt.expected @@ -18,6 +18,8 @@ import kotlin.Boolean import kotlin.Int public class HeroDetailsImpl() : Fragment { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/fragment_spread_with_include_directive/kotlin/operationBased/fragment_spread_with_include_directive/fragment/HumanDetailsImpl.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/fragment_spread_with_include_directive/kotlin/operationBased/fragment_spread_with_include_directive/fragment/HumanDetailsImpl.kt.expected index 104f136ec5c..1718fa77ae2 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/fragment_spread_with_include_directive/kotlin/operationBased/fragment_spread_with_include_directive/fragment/HumanDetailsImpl.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/fragment_spread_with_include_directive/kotlin/operationBased/fragment_spread_with_include_directive/fragment/HumanDetailsImpl.kt.expected @@ -18,6 +18,8 @@ import kotlin.Boolean import kotlin.Int public class HumanDetailsImpl() : Fragment { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/fragment_spread_with_include_directive/kotlin/operationBased/fragment_spread_with_include_directive/fragment/OtherDroidDetailsImpl.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/fragment_spread_with_include_directive/kotlin/operationBased/fragment_spread_with_include_directive/fragment/OtherDroidDetailsImpl.kt.expected index ddf73fe2739..99327d3f935 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/fragment_spread_with_include_directive/kotlin/operationBased/fragment_spread_with_include_directive/fragment/OtherDroidDetailsImpl.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/fragment_spread_with_include_directive/kotlin/operationBased/fragment_spread_with_include_directive/fragment/OtherDroidDetailsImpl.kt.expected @@ -18,6 +18,8 @@ import kotlin.Boolean import kotlin.Int public class OtherDroidDetailsImpl() : Fragment { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/fragment_spread_with_nested_fields/java/operationBased/fragment_spread_with_nested_fields/TestQuery.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/fragment_spread_with_nested_fields/java/operationBased/fragment_spread_with_nested_fields/TestQuery.java.expected index 816de7f564a..ff98f90125d 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/fragment_spread_with_nested_fields/java/operationBased/fragment_spread_with_nested_fields/TestQuery.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/fragment_spread_with_nested_fields/java/operationBased/fragment_spread_with_nested_fields/TestQuery.java.expected @@ -129,6 +129,11 @@ public class TestQuery implements Query { .build(); } + @Override + public boolean getIgnoreErrors() { + return false; + } + public static final class Builder { Builder() { } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/fragment_spread_with_nested_fields/java/operationBased/fragment_spread_with_nested_fields/fragment/HeroDetailsImpl.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/fragment_spread_with_nested_fields/java/operationBased/fragment_spread_with_nested_fields/fragment/HeroDetailsImpl.java.expected index 533a8be31b6..34eb7a5b753 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/fragment_spread_with_nested_fields/java/operationBased/fragment_spread_with_nested_fields/fragment/HeroDetailsImpl.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/fragment_spread_with_nested_fields/java/operationBased/fragment_spread_with_nested_fields/fragment/HeroDetailsImpl.java.expected @@ -79,4 +79,9 @@ public class HeroDetailsImpl implements Fragment { .selections(HeroDetailsSelections.__root) .build(); } + + @Override + public boolean getIgnoreErrors() { + return false; + } } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/fragment_spread_with_nested_fields/kotlin/operationBased/fragment_spread_with_nested_fields/TestQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/fragment_spread_with_nested_fields/kotlin/operationBased/fragment_spread_with_nested_fields/TestQuery.kt.expected index 65e225d9312..255a7126d6c 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/fragment_spread_with_nested_fields/kotlin/operationBased/fragment_spread_with_nested_fields/TestQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/fragment_spread_with_nested_fields/kotlin/operationBased/fragment_spread_with_nested_fields/TestQuery.kt.expected @@ -22,6 +22,8 @@ import kotlin.String import com.example.fragment_spread_with_nested_fields.type.Query as CompiledQuery public class TestQuery() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/fragment_spread_with_nested_fields/kotlin/operationBased/fragment_spread_with_nested_fields/fragment/HeroDetailsImpl.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/fragment_spread_with_nested_fields/kotlin/operationBased/fragment_spread_with_nested_fields/fragment/HeroDetailsImpl.kt.expected index 4647a47d24f..11768dedca1 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/fragment_spread_with_nested_fields/kotlin/operationBased/fragment_spread_with_nested_fields/fragment/HeroDetailsImpl.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/fragment_spread_with_nested_fields/kotlin/operationBased/fragment_spread_with_nested_fields/fragment/HeroDetailsImpl.kt.expected @@ -18,6 +18,8 @@ import kotlin.Boolean import kotlin.Int public class HeroDetailsImpl() : Fragment { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/fragment_spread_with_nested_fields/kotlin/responseBased/fragment_spread_with_nested_fields/TestQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/fragment_spread_with_nested_fields/kotlin/responseBased/fragment_spread_with_nested_fields/TestQuery.kt.expected index 6986883c512..e731b693661 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/fragment_spread_with_nested_fields/kotlin/responseBased/fragment_spread_with_nested_fields/TestQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/fragment_spread_with_nested_fields/kotlin/responseBased/fragment_spread_with_nested_fields/TestQuery.kt.expected @@ -24,6 +24,8 @@ import kotlin.collections.List import com.example.fragment_spread_with_nested_fields.type.Query as CompiledQuery public class TestQuery() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/fragment_spread_with_nested_fields/kotlin/responseBased/fragment_spread_with_nested_fields/fragment/HeroDetailsImpl.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/fragment_spread_with_nested_fields/kotlin/responseBased/fragment_spread_with_nested_fields/fragment/HeroDetailsImpl.kt.expected index 0fc01f08bce..d4173dbe125 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/fragment_spread_with_nested_fields/kotlin/responseBased/fragment_spread_with_nested_fields/fragment/HeroDetailsImpl.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/fragment_spread_with_nested_fields/kotlin/responseBased/fragment_spread_with_nested_fields/fragment/HeroDetailsImpl.kt.expected @@ -20,6 +20,8 @@ import kotlin.String import kotlin.collections.List public class HeroDetailsImpl() : Fragment { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/fragment_used_twice/java/operationBased/fragment_used_twice/TestQuery.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/fragment_used_twice/java/operationBased/fragment_used_twice/TestQuery.java.expected index bd793c6ca2d..95202f4fa65 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/fragment_used_twice/java/operationBased/fragment_used_twice/TestQuery.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/fragment_used_twice/java/operationBased/fragment_used_twice/TestQuery.java.expected @@ -136,6 +136,11 @@ public class TestQuery implements Query { .build(); } + @Override + public boolean getIgnoreErrors() { + return false; + } + public static final class Builder { Builder() { } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/fragment_used_twice/java/operationBased/fragment_used_twice/fragment/CharacterDetailsImpl.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/fragment_used_twice/java/operationBased/fragment_used_twice/fragment/CharacterDetailsImpl.java.expected index 5251403a88c..b5e0c495924 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/fragment_used_twice/java/operationBased/fragment_used_twice/fragment/CharacterDetailsImpl.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/fragment_used_twice/java/operationBased/fragment_used_twice/fragment/CharacterDetailsImpl.java.expected @@ -79,4 +79,9 @@ public class CharacterDetailsImpl implements Fragment { .selections(CharacterDetailsSelections.__root) .build(); } + + @Override + public boolean getIgnoreErrors() { + return false; + } } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/fragment_used_twice/java/operationBased/fragment_used_twice/fragment/HeroDetailsImpl.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/fragment_used_twice/java/operationBased/fragment_used_twice/fragment/HeroDetailsImpl.java.expected index 5eb7c3fa171..07347d6b819 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/fragment_used_twice/java/operationBased/fragment_used_twice/fragment/HeroDetailsImpl.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/fragment_used_twice/java/operationBased/fragment_used_twice/fragment/HeroDetailsImpl.java.expected @@ -79,4 +79,9 @@ public class HeroDetailsImpl implements Fragment { .selections(HeroDetailsSelections.__root) .build(); } + + @Override + public boolean getIgnoreErrors() { + return false; + } } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/fragment_used_twice/java/operationBased/fragment_used_twice/fragment/HumanDetailsImpl.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/fragment_used_twice/java/operationBased/fragment_used_twice/fragment/HumanDetailsImpl.java.expected index 89548457501..0cb46746b12 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/fragment_used_twice/java/operationBased/fragment_used_twice/fragment/HumanDetailsImpl.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/fragment_used_twice/java/operationBased/fragment_used_twice/fragment/HumanDetailsImpl.java.expected @@ -79,4 +79,9 @@ public class HumanDetailsImpl implements Fragment { .selections(HumanDetailsSelections.__root) .build(); } + + @Override + public boolean getIgnoreErrors() { + return false; + } } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/fragment_used_twice/kotlin/operationBased/fragment_used_twice/TestQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/fragment_used_twice/kotlin/operationBased/fragment_used_twice/TestQuery.kt.expected index d76ce4fd9c3..a5ce671d79b 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/fragment_used_twice/kotlin/operationBased/fragment_used_twice/TestQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/fragment_used_twice/kotlin/operationBased/fragment_used_twice/TestQuery.kt.expected @@ -23,6 +23,8 @@ import kotlin.String import com.example.fragment_used_twice.type.Query as CompiledQuery public class TestQuery() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/fragment_used_twice/kotlin/operationBased/fragment_used_twice/fragment/CharacterDetailsImpl.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/fragment_used_twice/kotlin/operationBased/fragment_used_twice/fragment/CharacterDetailsImpl.kt.expected index 16ac96b7191..7bfa3a6d8e0 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/fragment_used_twice/kotlin/operationBased/fragment_used_twice/fragment/CharacterDetailsImpl.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/fragment_used_twice/kotlin/operationBased/fragment_used_twice/fragment/CharacterDetailsImpl.kt.expected @@ -18,6 +18,8 @@ import kotlin.Boolean import kotlin.Int public class CharacterDetailsImpl() : Fragment { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/fragment_used_twice/kotlin/operationBased/fragment_used_twice/fragment/HeroDetailsImpl.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/fragment_used_twice/kotlin/operationBased/fragment_used_twice/fragment/HeroDetailsImpl.kt.expected index 30aa4170d45..839da845e3c 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/fragment_used_twice/kotlin/operationBased/fragment_used_twice/fragment/HeroDetailsImpl.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/fragment_used_twice/kotlin/operationBased/fragment_used_twice/fragment/HeroDetailsImpl.kt.expected @@ -18,6 +18,8 @@ import kotlin.Boolean import kotlin.Int public class HeroDetailsImpl() : Fragment { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/fragment_used_twice/kotlin/operationBased/fragment_used_twice/fragment/HumanDetailsImpl.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/fragment_used_twice/kotlin/operationBased/fragment_used_twice/fragment/HumanDetailsImpl.kt.expected index 0488a199ae3..9d207489e0d 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/fragment_used_twice/kotlin/operationBased/fragment_used_twice/fragment/HumanDetailsImpl.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/fragment_used_twice/kotlin/operationBased/fragment_used_twice/fragment/HumanDetailsImpl.kt.expected @@ -18,6 +18,8 @@ import kotlin.Boolean import kotlin.Int public class HumanDetailsImpl() : Fragment { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/fragment_used_twice/kotlin/responseBased/fragment_used_twice/TestQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/fragment_used_twice/kotlin/responseBased/fragment_used_twice/TestQuery.kt.expected index a3b68ce7499..8ef78fd4e61 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/fragment_used_twice/kotlin/responseBased/fragment_used_twice/TestQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/fragment_used_twice/kotlin/responseBased/fragment_used_twice/TestQuery.kt.expected @@ -25,6 +25,8 @@ import kotlin.Suppress import com.example.fragment_used_twice.type.Query as CompiledQuery public class TestQuery() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/fragment_used_twice/kotlin/responseBased/fragment_used_twice/fragment/CharacterDetailsImpl.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/fragment_used_twice/kotlin/responseBased/fragment_used_twice/fragment/CharacterDetailsImpl.kt.expected index 11f86cdd2ea..0500ba563c9 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/fragment_used_twice/kotlin/responseBased/fragment_used_twice/fragment/CharacterDetailsImpl.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/fragment_used_twice/kotlin/responseBased/fragment_used_twice/fragment/CharacterDetailsImpl.kt.expected @@ -19,6 +19,8 @@ import kotlin.Int import kotlin.String public class CharacterDetailsImpl() : Fragment { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/fragment_used_twice/kotlin/responseBased/fragment_used_twice/fragment/HeroDetailsImpl.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/fragment_used_twice/kotlin/responseBased/fragment_used_twice/fragment/HeroDetailsImpl.kt.expected index 9b3b6d5facd..ae5fa9bc0ce 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/fragment_used_twice/kotlin/responseBased/fragment_used_twice/fragment/HeroDetailsImpl.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/fragment_used_twice/kotlin/responseBased/fragment_used_twice/fragment/HeroDetailsImpl.kt.expected @@ -20,6 +20,8 @@ import kotlin.String import kotlin.Suppress public class HeroDetailsImpl() : Fragment { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/fragment_used_twice/kotlin/responseBased/fragment_used_twice/fragment/HumanDetailsImpl.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/fragment_used_twice/kotlin/responseBased/fragment_used_twice/fragment/HumanDetailsImpl.kt.expected index e5d035a21f2..730adfe903a 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/fragment_used_twice/kotlin/responseBased/fragment_used_twice/fragment/HumanDetailsImpl.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/fragment_used_twice/kotlin/responseBased/fragment_used_twice/fragment/HumanDetailsImpl.kt.expected @@ -20,6 +20,8 @@ import kotlin.String import kotlin.Suppress public class HumanDetailsImpl() : Fragment { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/fragment_with_inline_fragment/java/operationBased/fragment_with_inline_fragment/TestQuery.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/fragment_with_inline_fragment/java/operationBased/fragment_with_inline_fragment/TestQuery.java.expected index 664f783d738..20e1f735eed 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/fragment_with_inline_fragment/java/operationBased/fragment_with_inline_fragment/TestQuery.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/fragment_with_inline_fragment/java/operationBased/fragment_with_inline_fragment/TestQuery.java.expected @@ -148,6 +148,11 @@ public class TestQuery implements Query { .build(); } + @Override + public boolean getIgnoreErrors() { + return false; + } + public static final class Builder { Builder() { } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/fragment_with_inline_fragment/java/operationBased/fragment_with_inline_fragment/fragment/DroidDetailsImpl.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/fragment_with_inline_fragment/java/operationBased/fragment_with_inline_fragment/fragment/DroidDetailsImpl.java.expected index 35e9c00c78d..aca0e3d4685 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/fragment_with_inline_fragment/java/operationBased/fragment_with_inline_fragment/fragment/DroidDetailsImpl.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/fragment_with_inline_fragment/java/operationBased/fragment_with_inline_fragment/fragment/DroidDetailsImpl.java.expected @@ -79,4 +79,9 @@ public class DroidDetailsImpl implements Fragment { .selections(DroidDetailsSelections.__root) .build(); } + + @Override + public boolean getIgnoreErrors() { + return false; + } } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/fragment_with_inline_fragment/java/operationBased/fragment_with_inline_fragment/fragment/HeroDetailsImpl.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/fragment_with_inline_fragment/java/operationBased/fragment_with_inline_fragment/fragment/HeroDetailsImpl.java.expected index 5a6d7d3f210..c8c8b367a59 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/fragment_with_inline_fragment/java/operationBased/fragment_with_inline_fragment/fragment/HeroDetailsImpl.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/fragment_with_inline_fragment/java/operationBased/fragment_with_inline_fragment/fragment/HeroDetailsImpl.java.expected @@ -79,4 +79,9 @@ public class HeroDetailsImpl implements Fragment { .selections(HeroDetailsSelections.__root) .build(); } + + @Override + public boolean getIgnoreErrors() { + return false; + } } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/fragment_with_inline_fragment/java/operationBased/fragment_with_inline_fragment/fragment/HumanDetailsImpl.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/fragment_with_inline_fragment/java/operationBased/fragment_with_inline_fragment/fragment/HumanDetailsImpl.java.expected index a694026d347..9b7fb4e28eb 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/fragment_with_inline_fragment/java/operationBased/fragment_with_inline_fragment/fragment/HumanDetailsImpl.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/fragment_with_inline_fragment/java/operationBased/fragment_with_inline_fragment/fragment/HumanDetailsImpl.java.expected @@ -79,4 +79,9 @@ public class HumanDetailsImpl implements Fragment { .selections(HumanDetailsSelections.__root) .build(); } + + @Override + public boolean getIgnoreErrors() { + return false; + } } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/fragment_with_inline_fragment/kotlin/operationBased/fragment_with_inline_fragment/TestQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/fragment_with_inline_fragment/kotlin/operationBased/fragment_with_inline_fragment/TestQuery.kt.expected index 73664f29008..d0696078f2a 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/fragment_with_inline_fragment/kotlin/operationBased/fragment_with_inline_fragment/TestQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/fragment_with_inline_fragment/kotlin/operationBased/fragment_with_inline_fragment/TestQuery.kt.expected @@ -24,6 +24,8 @@ import kotlin.collections.List import com.example.fragment_with_inline_fragment.type.Query as CompiledQuery public class TestQuery() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/fragment_with_inline_fragment/kotlin/operationBased/fragment_with_inline_fragment/fragment/DroidDetailsImpl.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/fragment_with_inline_fragment/kotlin/operationBased/fragment_with_inline_fragment/fragment/DroidDetailsImpl.kt.expected index 5201275941d..9de134939e6 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/fragment_with_inline_fragment/kotlin/operationBased/fragment_with_inline_fragment/fragment/DroidDetailsImpl.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/fragment_with_inline_fragment/kotlin/operationBased/fragment_with_inline_fragment/fragment/DroidDetailsImpl.kt.expected @@ -18,6 +18,8 @@ import kotlin.Boolean import kotlin.Int public class DroidDetailsImpl() : Fragment { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/fragment_with_inline_fragment/kotlin/operationBased/fragment_with_inline_fragment/fragment/HeroDetailsImpl.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/fragment_with_inline_fragment/kotlin/operationBased/fragment_with_inline_fragment/fragment/HeroDetailsImpl.kt.expected index f2c9f88d364..ee6d58b2f8d 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/fragment_with_inline_fragment/kotlin/operationBased/fragment_with_inline_fragment/fragment/HeroDetailsImpl.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/fragment_with_inline_fragment/kotlin/operationBased/fragment_with_inline_fragment/fragment/HeroDetailsImpl.kt.expected @@ -18,6 +18,8 @@ import kotlin.Boolean import kotlin.Int public class HeroDetailsImpl() : Fragment { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/fragment_with_inline_fragment/kotlin/operationBased/fragment_with_inline_fragment/fragment/HumanDetailsImpl.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/fragment_with_inline_fragment/kotlin/operationBased/fragment_with_inline_fragment/fragment/HumanDetailsImpl.kt.expected index 3a7e7b8f92c..6fd43ac60ed 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/fragment_with_inline_fragment/kotlin/operationBased/fragment_with_inline_fragment/fragment/HumanDetailsImpl.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/fragment_with_inline_fragment/kotlin/operationBased/fragment_with_inline_fragment/fragment/HumanDetailsImpl.kt.expected @@ -18,6 +18,8 @@ import kotlin.Boolean import kotlin.Int public class HumanDetailsImpl() : Fragment { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/fragment_with_inline_fragment/kotlin/responseBased/fragment_with_inline_fragment/TestQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/fragment_with_inline_fragment/kotlin/responseBased/fragment_with_inline_fragment/TestQuery.kt.expected index 2e693669b81..018b5c59387 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/fragment_with_inline_fragment/kotlin/responseBased/fragment_with_inline_fragment/TestQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/fragment_with_inline_fragment/kotlin/responseBased/fragment_with_inline_fragment/TestQuery.kt.expected @@ -27,6 +27,8 @@ import kotlin.collections.List import com.example.fragment_with_inline_fragment.type.Query as CompiledQuery public class TestQuery() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/fragment_with_inline_fragment/kotlin/responseBased/fragment_with_inline_fragment/fragment/DroidDetailsImpl.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/fragment_with_inline_fragment/kotlin/responseBased/fragment_with_inline_fragment/fragment/DroidDetailsImpl.kt.expected index e12e4c0eb2f..4c9368f832c 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/fragment_with_inline_fragment/kotlin/responseBased/fragment_with_inline_fragment/fragment/DroidDetailsImpl.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/fragment_with_inline_fragment/kotlin/responseBased/fragment_with_inline_fragment/fragment/DroidDetailsImpl.kt.expected @@ -19,6 +19,8 @@ import kotlin.Int import kotlin.String public class DroidDetailsImpl() : Fragment { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/fragment_with_inline_fragment/kotlin/responseBased/fragment_with_inline_fragment/fragment/HeroDetailsImpl.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/fragment_with_inline_fragment/kotlin/responseBased/fragment_with_inline_fragment/fragment/HeroDetailsImpl.kt.expected index fd38dd6c30f..b6168f4c3ce 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/fragment_with_inline_fragment/kotlin/responseBased/fragment_with_inline_fragment/fragment/HeroDetailsImpl.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/fragment_with_inline_fragment/kotlin/responseBased/fragment_with_inline_fragment/fragment/HeroDetailsImpl.kt.expected @@ -21,6 +21,8 @@ import kotlin.Suppress import kotlin.collections.List public class HeroDetailsImpl() : Fragment { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/fragment_with_inline_fragment/kotlin/responseBased/fragment_with_inline_fragment/fragment/HumanDetailsImpl.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/fragment_with_inline_fragment/kotlin/responseBased/fragment_with_inline_fragment/fragment/HumanDetailsImpl.kt.expected index c646dde0720..4b8d15c5633 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/fragment_with_inline_fragment/kotlin/responseBased/fragment_with_inline_fragment/fragment/HumanDetailsImpl.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/fragment_with_inline_fragment/kotlin/responseBased/fragment_with_inline_fragment/fragment/HumanDetailsImpl.kt.expected @@ -19,6 +19,8 @@ import kotlin.Int import kotlin.String public class HumanDetailsImpl() : Fragment { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/fragment_with_multiple_fieldsets/java/operationBased/fragment_with_multiple_fieldsets/TestQuery.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/fragment_with_multiple_fieldsets/java/operationBased/fragment_with_multiple_fieldsets/TestQuery.java.expected index 6e66bfdd63b..53ac4195ec2 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/fragment_with_multiple_fieldsets/java/operationBased/fragment_with_multiple_fieldsets/TestQuery.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/fragment_with_multiple_fieldsets/java/operationBased/fragment_with_multiple_fieldsets/TestQuery.java.expected @@ -124,6 +124,11 @@ public class TestQuery implements Query { .build(); } + @Override + public boolean getIgnoreErrors() { + return false; + } + public static final class Builder { Builder() { } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/fragment_with_multiple_fieldsets/java/operationBased/fragment_with_multiple_fieldsets/fragment/IFragmentImpl.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/fragment_with_multiple_fieldsets/java/operationBased/fragment_with_multiple_fieldsets/fragment/IFragmentImpl.java.expected index ae25822c331..29b051d9a1a 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/fragment_with_multiple_fieldsets/java/operationBased/fragment_with_multiple_fieldsets/fragment/IFragmentImpl.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/fragment_with_multiple_fieldsets/java/operationBased/fragment_with_multiple_fieldsets/fragment/IFragmentImpl.java.expected @@ -79,4 +79,9 @@ public class IFragmentImpl implements Fragment { .selections(iFragmentSelections.__root) .build(); } + + @Override + public boolean getIgnoreErrors() { + return false; + } } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/fragment_with_multiple_fieldsets/kotlin/operationBased/fragment_with_multiple_fieldsets/TestQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/fragment_with_multiple_fieldsets/kotlin/operationBased/fragment_with_multiple_fieldsets/TestQuery.kt.expected index 3a1a3234ed3..229d2a75388 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/fragment_with_multiple_fieldsets/kotlin/operationBased/fragment_with_multiple_fieldsets/TestQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/fragment_with_multiple_fieldsets/kotlin/operationBased/fragment_with_multiple_fieldsets/TestQuery.kt.expected @@ -22,6 +22,8 @@ import kotlin.String import com.example.fragment_with_multiple_fieldsets.type.Query as CompiledQuery public class TestQuery() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/fragment_with_multiple_fieldsets/kotlin/operationBased/fragment_with_multiple_fieldsets/fragment/IFragmentImpl.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/fragment_with_multiple_fieldsets/kotlin/operationBased/fragment_with_multiple_fieldsets/fragment/IFragmentImpl.kt.expected index fe554dbeab8..9ec681386c1 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/fragment_with_multiple_fieldsets/kotlin/operationBased/fragment_with_multiple_fieldsets/fragment/IFragmentImpl.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/fragment_with_multiple_fieldsets/kotlin/operationBased/fragment_with_multiple_fieldsets/fragment/IFragmentImpl.kt.expected @@ -18,6 +18,8 @@ import kotlin.Boolean import kotlin.Int public class IFragmentImpl() : Fragment { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/fragment_with_multiple_fieldsets/kotlin/responseBased/fragment_with_multiple_fieldsets/TestQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/fragment_with_multiple_fieldsets/kotlin/responseBased/fragment_with_multiple_fieldsets/TestQuery.kt.expected index 3b6c7a7658e..519d83dbc4a 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/fragment_with_multiple_fieldsets/kotlin/responseBased/fragment_with_multiple_fieldsets/TestQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/fragment_with_multiple_fieldsets/kotlin/responseBased/fragment_with_multiple_fieldsets/TestQuery.kt.expected @@ -24,6 +24,8 @@ import kotlin.Suppress import com.example.fragment_with_multiple_fieldsets.type.Query as CompiledQuery public class TestQuery() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/fragment_with_multiple_fieldsets/kotlin/responseBased/fragment_with_multiple_fieldsets/fragment/IFragmentImpl.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/fragment_with_multiple_fieldsets/kotlin/responseBased/fragment_with_multiple_fieldsets/fragment/IFragmentImpl.kt.expected index fb7f52a056f..724add7ac85 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/fragment_with_multiple_fieldsets/kotlin/responseBased/fragment_with_multiple_fieldsets/fragment/IFragmentImpl.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/fragment_with_multiple_fieldsets/kotlin/responseBased/fragment_with_multiple_fieldsets/fragment/IFragmentImpl.kt.expected @@ -20,6 +20,8 @@ import kotlin.String import kotlin.Suppress public class IFragmentImpl() : Fragment { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/fragments_same_type_condition/java/operationBased/fragments_same_type_condition/TestQuery.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/fragments_same_type_condition/java/operationBased/fragments_same_type_condition/TestQuery.java.expected index 903a06afa65..3427bfb5262 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/fragments_same_type_condition/java/operationBased/fragments_same_type_condition/TestQuery.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/fragments_same_type_condition/java/operationBased/fragments_same_type_condition/TestQuery.java.expected @@ -127,6 +127,11 @@ public class TestQuery implements Query { .build(); } + @Override + public boolean getIgnoreErrors() { + return false; + } + public static final class Builder { Builder() { } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/fragments_same_type_condition/java/operationBased/fragments_same_type_condition/fragment/DroidDetails1Impl.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/fragments_same_type_condition/java/operationBased/fragments_same_type_condition/fragment/DroidDetails1Impl.java.expected index 2cad6fa6ff7..7362d060cf9 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/fragments_same_type_condition/java/operationBased/fragments_same_type_condition/fragment/DroidDetails1Impl.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/fragments_same_type_condition/java/operationBased/fragments_same_type_condition/fragment/DroidDetails1Impl.java.expected @@ -79,4 +79,9 @@ public class DroidDetails1Impl implements Fragment { .selections(DroidDetails1Selections.__root) .build(); } + + @Override + public boolean getIgnoreErrors() { + return false; + } } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/fragments_same_type_condition/java/operationBased/fragments_same_type_condition/fragment/DroidDetails2Impl.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/fragments_same_type_condition/java/operationBased/fragments_same_type_condition/fragment/DroidDetails2Impl.java.expected index e10b609f656..66c8b7a942c 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/fragments_same_type_condition/java/operationBased/fragments_same_type_condition/fragment/DroidDetails2Impl.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/fragments_same_type_condition/java/operationBased/fragments_same_type_condition/fragment/DroidDetails2Impl.java.expected @@ -79,4 +79,9 @@ public class DroidDetails2Impl implements Fragment { .selections(DroidDetails2Selections.__root) .build(); } + + @Override + public boolean getIgnoreErrors() { + return false; + } } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/fragments_same_type_condition/kotlin/operationBased/fragments_same_type_condition/TestQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/fragments_same_type_condition/kotlin/operationBased/fragments_same_type_condition/TestQuery.kt.expected index d1750590fb9..c072e2d8079 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/fragments_same_type_condition/kotlin/operationBased/fragments_same_type_condition/TestQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/fragments_same_type_condition/kotlin/operationBased/fragments_same_type_condition/TestQuery.kt.expected @@ -23,6 +23,8 @@ import kotlin.String import com.example.fragments_same_type_condition.type.Query as CompiledQuery public class TestQuery() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/fragments_same_type_condition/kotlin/operationBased/fragments_same_type_condition/fragment/DroidDetails1Impl.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/fragments_same_type_condition/kotlin/operationBased/fragments_same_type_condition/fragment/DroidDetails1Impl.kt.expected index 4c62f101e64..f8a12c45873 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/fragments_same_type_condition/kotlin/operationBased/fragments_same_type_condition/fragment/DroidDetails1Impl.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/fragments_same_type_condition/kotlin/operationBased/fragments_same_type_condition/fragment/DroidDetails1Impl.kt.expected @@ -18,6 +18,8 @@ import kotlin.Boolean import kotlin.Int public class DroidDetails1Impl() : Fragment { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/fragments_same_type_condition/kotlin/operationBased/fragments_same_type_condition/fragment/DroidDetails2Impl.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/fragments_same_type_condition/kotlin/operationBased/fragments_same_type_condition/fragment/DroidDetails2Impl.kt.expected index b781fc4e565..c49006ce905 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/fragments_same_type_condition/kotlin/operationBased/fragments_same_type_condition/fragment/DroidDetails2Impl.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/fragments_same_type_condition/kotlin/operationBased/fragments_same_type_condition/fragment/DroidDetails2Impl.kt.expected @@ -18,6 +18,8 @@ import kotlin.Boolean import kotlin.Int public class DroidDetails2Impl() : Fragment { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/fragments_same_type_condition/kotlin/responseBased/fragments_same_type_condition/TestQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/fragments_same_type_condition/kotlin/responseBased/fragments_same_type_condition/TestQuery.kt.expected index b79fa3dbe58..3c930bb9acd 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/fragments_same_type_condition/kotlin/responseBased/fragments_same_type_condition/TestQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/fragments_same_type_condition/kotlin/responseBased/fragments_same_type_condition/TestQuery.kt.expected @@ -24,6 +24,8 @@ import kotlin.Suppress import com.example.fragments_same_type_condition.type.Query as CompiledQuery public class TestQuery() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/fragments_same_type_condition/kotlin/responseBased/fragments_same_type_condition/fragment/DroidDetails1Impl.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/fragments_same_type_condition/kotlin/responseBased/fragments_same_type_condition/fragment/DroidDetails1Impl.kt.expected index eaa92af1762..845ccfe968f 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/fragments_same_type_condition/kotlin/responseBased/fragments_same_type_condition/fragment/DroidDetails1Impl.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/fragments_same_type_condition/kotlin/responseBased/fragments_same_type_condition/fragment/DroidDetails1Impl.kt.expected @@ -19,6 +19,8 @@ import kotlin.Int import kotlin.String public class DroidDetails1Impl() : Fragment { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/fragments_same_type_condition/kotlin/responseBased/fragments_same_type_condition/fragment/DroidDetails2Impl.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/fragments_same_type_condition/kotlin/responseBased/fragments_same_type_condition/fragment/DroidDetails2Impl.kt.expected index 262350c75cf..6d1525a9a58 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/fragments_same_type_condition/kotlin/responseBased/fragments_same_type_condition/fragment/DroidDetails2Impl.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/fragments_same_type_condition/kotlin/responseBased/fragments_same_type_condition/fragment/DroidDetails2Impl.kt.expected @@ -19,6 +19,8 @@ import kotlin.Int import kotlin.String public class DroidDetails2Impl() : Fragment { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_defer_and_include_directives/java/operationBased/fragments_with_defer_and_include_directives/InlineMultipleWithDefer.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_defer_and_include_directives/java/operationBased/fragments_with_defer_and_include_directives/InlineMultipleWithDefer.java.expected index c132d9a21d1..941ca2e9d20 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_defer_and_include_directives/java/operationBased/fragments_with_defer_and_include_directives/InlineMultipleWithDefer.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_defer_and_include_directives/java/operationBased/fragments_with_defer_and_include_directives/InlineMultipleWithDefer.java.expected @@ -121,6 +121,11 @@ public class InlineMultipleWithDefer implements Query .build(); } + @Override + public boolean getIgnoreErrors() { + return false; + } + public static final class Builder { Builder() { } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_defer_and_include_directives/java/operationBased/fragments_with_defer_and_include_directives/SpreadMultipleWithDefer.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_defer_and_include_directives/java/operationBased/fragments_with_defer_and_include_directives/SpreadMultipleWithDefer.java.expected index 22ebb5714ea..10731d4c092 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_defer_and_include_directives/java/operationBased/fragments_with_defer_and_include_directives/SpreadMultipleWithDefer.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_defer_and_include_directives/java/operationBased/fragments_with_defer_and_include_directives/SpreadMultipleWithDefer.java.expected @@ -122,6 +122,11 @@ public class SpreadMultipleWithDefer implements Query .build(); } + @Override + public boolean getIgnoreErrors() { + return false; + } + public static final class Builder { Builder() { } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_defer_and_include_directives/java/operationBased/fragments_with_defer_and_include_directives/fragment/CharacterDetails2Impl.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_defer_and_include_directives/java/operationBased/fragments_with_defer_and_include_directives/fragment/CharacterDetails2Impl.java.expected index 0205a8496d9..58edaf80f54 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_defer_and_include_directives/java/operationBased/fragments_with_defer_and_include_directives/fragment/CharacterDetails2Impl.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_defer_and_include_directives/java/operationBased/fragments_with_defer_and_include_directives/fragment/CharacterDetails2Impl.java.expected @@ -79,4 +79,9 @@ public class CharacterDetails2Impl implements Fragment { .selections(CharacterDetails2Selections.__root) .build(); } + + @Override + public boolean getIgnoreErrors() { + return false; + } } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_defer_and_include_directives/java/operationBased/fragments_with_defer_and_include_directives/fragment/CharacterDetails3Impl.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_defer_and_include_directives/java/operationBased/fragments_with_defer_and_include_directives/fragment/CharacterDetails3Impl.java.expected index b1962d64ec0..d1cc3917b3e 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_defer_and_include_directives/java/operationBased/fragments_with_defer_and_include_directives/fragment/CharacterDetails3Impl.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_defer_and_include_directives/java/operationBased/fragments_with_defer_and_include_directives/fragment/CharacterDetails3Impl.java.expected @@ -79,4 +79,9 @@ public class CharacterDetails3Impl implements Fragment { .selections(CharacterDetails3Selections.__root) .build(); } + + @Override + public boolean getIgnoreErrors() { + return false; + } } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_defer_and_include_directives/java/operationBased/fragments_with_defer_and_include_directives/fragment/CharacterDetailsImpl.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_defer_and_include_directives/java/operationBased/fragments_with_defer_and_include_directives/fragment/CharacterDetailsImpl.java.expected index 8e6d10ed2dc..a74d551088a 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_defer_and_include_directives/java/operationBased/fragments_with_defer_and_include_directives/fragment/CharacterDetailsImpl.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_defer_and_include_directives/java/operationBased/fragments_with_defer_and_include_directives/fragment/CharacterDetailsImpl.java.expected @@ -79,4 +79,9 @@ public class CharacterDetailsImpl implements Fragment { .selections(CharacterDetailsSelections.__root) .build(); } + + @Override + public boolean getIgnoreErrors() { + return false; + } } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_defer_and_include_directives/java/operationBased/fragments_with_defer_and_include_directives/fragment/DroidDetailsImpl.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_defer_and_include_directives/java/operationBased/fragments_with_defer_and_include_directives/fragment/DroidDetailsImpl.java.expected index b65c4ef1cd7..640695d4535 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_defer_and_include_directives/java/operationBased/fragments_with_defer_and_include_directives/fragment/DroidDetailsImpl.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_defer_and_include_directives/java/operationBased/fragments_with_defer_and_include_directives/fragment/DroidDetailsImpl.java.expected @@ -79,4 +79,9 @@ public class DroidDetailsImpl implements Fragment { .selections(DroidDetailsSelections.__root) .build(); } + + @Override + public boolean getIgnoreErrors() { + return false; + } } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_defer_and_include_directives/kotlin/operationBased/fragments_with_defer_and_include_directives/InlineMultipleWithDefer.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_defer_and_include_directives/kotlin/operationBased/fragments_with_defer_and_include_directives/InlineMultipleWithDefer.kt.expected index 01e24cc9800..0e77178483a 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_defer_and_include_directives/kotlin/operationBased/fragments_with_defer_and_include_directives/InlineMultipleWithDefer.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_defer_and_include_directives/kotlin/operationBased/fragments_with_defer_and_include_directives/InlineMultipleWithDefer.kt.expected @@ -21,6 +21,8 @@ import kotlin.String import com.example.fragments_with_defer_and_include_directives.type.Query as CompiledQuery public class InlineMultipleWithDefer() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_defer_and_include_directives/kotlin/operationBased/fragments_with_defer_and_include_directives/InlineMultipleWithDeferAndInclude.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_defer_and_include_directives/kotlin/operationBased/fragments_with_defer_and_include_directives/InlineMultipleWithDeferAndInclude.kt.expected index daa4c20d168..d8ae1f6fb75 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_defer_and_include_directives/kotlin/operationBased/fragments_with_defer_and_include_directives/InlineMultipleWithDeferAndInclude.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_defer_and_include_directives/kotlin/operationBased/fragments_with_defer_and_include_directives/InlineMultipleWithDeferAndInclude.kt.expected @@ -25,6 +25,8 @@ public data class InlineMultipleWithDeferAndInclude( public val cond3: Boolean, public val cond4: Boolean, ) : Query { + override val ignoreErrors: Boolean = false + override fun id(): String = OPERATION_ID override fun document(): String = OPERATION_DOCUMENT diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_defer_and_include_directives/kotlin/operationBased/fragments_with_defer_and_include_directives/InlineMultipleWithDeferWithIf.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_defer_and_include_directives/kotlin/operationBased/fragments_with_defer_and_include_directives/InlineMultipleWithDeferWithIf.kt.expected index 79151641914..fd49cf4f4ca 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_defer_and_include_directives/kotlin/operationBased/fragments_with_defer_and_include_directives/InlineMultipleWithDeferWithIf.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_defer_and_include_directives/kotlin/operationBased/fragments_with_defer_and_include_directives/InlineMultipleWithDeferWithIf.kt.expected @@ -22,6 +22,8 @@ import com.example.fragments_with_defer_and_include_directives.type.Query as Com public data class InlineMultipleWithDeferWithIf( public val cond: Boolean, ) : Query { + override val ignoreErrors: Boolean = false + override fun id(): String = OPERATION_ID override fun document(): String = OPERATION_DOCUMENT diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_defer_and_include_directives/kotlin/operationBased/fragments_with_defer_and_include_directives/InlineSingleWithDefer.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_defer_and_include_directives/kotlin/operationBased/fragments_with_defer_and_include_directives/InlineSingleWithDefer.kt.expected index 9dbb01c6464..eb941a83927 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_defer_and_include_directives/kotlin/operationBased/fragments_with_defer_and_include_directives/InlineSingleWithDefer.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_defer_and_include_directives/kotlin/operationBased/fragments_with_defer_and_include_directives/InlineSingleWithDefer.kt.expected @@ -21,6 +21,8 @@ import kotlin.String import com.example.fragments_with_defer_and_include_directives.type.Query as CompiledQuery public class InlineSingleWithDefer() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_defer_and_include_directives/kotlin/operationBased/fragments_with_defer_and_include_directives/SpreadMultipleWithDefer.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_defer_and_include_directives/kotlin/operationBased/fragments_with_defer_and_include_directives/SpreadMultipleWithDefer.kt.expected index ae58b807384..740b45b853c 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_defer_and_include_directives/kotlin/operationBased/fragments_with_defer_and_include_directives/SpreadMultipleWithDefer.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_defer_and_include_directives/kotlin/operationBased/fragments_with_defer_and_include_directives/SpreadMultipleWithDefer.kt.expected @@ -22,6 +22,8 @@ import kotlin.String import com.example.fragments_with_defer_and_include_directives.type.Query as CompiledQuery public class SpreadMultipleWithDefer() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_defer_and_include_directives/kotlin/operationBased/fragments_with_defer_and_include_directives/SpreadMultipleWithDeferAndInclude.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_defer_and_include_directives/kotlin/operationBased/fragments_with_defer_and_include_directives/SpreadMultipleWithDeferAndInclude.kt.expected index dabd8de64d1..55663096c93 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_defer_and_include_directives/kotlin/operationBased/fragments_with_defer_and_include_directives/SpreadMultipleWithDeferAndInclude.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_defer_and_include_directives/kotlin/operationBased/fragments_with_defer_and_include_directives/SpreadMultipleWithDeferAndInclude.kt.expected @@ -26,6 +26,8 @@ public data class SpreadMultipleWithDeferAndInclude( public val cond3: Boolean, public val cond4: Boolean, ) : Query { + override val ignoreErrors: Boolean = false + override fun id(): String = OPERATION_ID override fun document(): String = OPERATION_DOCUMENT diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_defer_and_include_directives/kotlin/operationBased/fragments_with_defer_and_include_directives/SpreadMultipleWithDeferWithIf.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_defer_and_include_directives/kotlin/operationBased/fragments_with_defer_and_include_directives/SpreadMultipleWithDeferWithIf.kt.expected index 34ede6ad221..01eeb31ecaf 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_defer_and_include_directives/kotlin/operationBased/fragments_with_defer_and_include_directives/SpreadMultipleWithDeferWithIf.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_defer_and_include_directives/kotlin/operationBased/fragments_with_defer_and_include_directives/SpreadMultipleWithDeferWithIf.kt.expected @@ -25,6 +25,8 @@ import com.example.fragments_with_defer_and_include_directives.type.Query as Com public data class SpreadMultipleWithDeferWithIf( public val cond: Boolean, ) : Query { + override val ignoreErrors: Boolean = false + override fun id(): String = OPERATION_ID override fun document(): String = OPERATION_DOCUMENT diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_defer_and_include_directives/kotlin/operationBased/fragments_with_defer_and_include_directives/SpreadSingleWithDefer.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_defer_and_include_directives/kotlin/operationBased/fragments_with_defer_and_include_directives/SpreadSingleWithDefer.kt.expected index c7a60ff7f05..46dc6cbcdc0 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_defer_and_include_directives/kotlin/operationBased/fragments_with_defer_and_include_directives/SpreadSingleWithDefer.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_defer_and_include_directives/kotlin/operationBased/fragments_with_defer_and_include_directives/SpreadSingleWithDefer.kt.expected @@ -22,6 +22,8 @@ import kotlin.String import com.example.fragments_with_defer_and_include_directives.type.Query as CompiledQuery public class SpreadSingleWithDefer() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_defer_and_include_directives/kotlin/operationBased/fragments_with_defer_and_include_directives/fragment/CharacterDetails2Impl.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_defer_and_include_directives/kotlin/operationBased/fragments_with_defer_and_include_directives/fragment/CharacterDetails2Impl.kt.expected index ae6458c411d..d402494350b 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_defer_and_include_directives/kotlin/operationBased/fragments_with_defer_and_include_directives/fragment/CharacterDetails2Impl.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_defer_and_include_directives/kotlin/operationBased/fragments_with_defer_and_include_directives/fragment/CharacterDetails2Impl.kt.expected @@ -18,6 +18,8 @@ import kotlin.Boolean import kotlin.Int public class CharacterDetails2Impl() : Fragment { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_defer_and_include_directives/kotlin/operationBased/fragments_with_defer_and_include_directives/fragment/CharacterDetails3Impl.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_defer_and_include_directives/kotlin/operationBased/fragments_with_defer_and_include_directives/fragment/CharacterDetails3Impl.kt.expected index 411fe18cdfa..af061c2f35a 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_defer_and_include_directives/kotlin/operationBased/fragments_with_defer_and_include_directives/fragment/CharacterDetails3Impl.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_defer_and_include_directives/kotlin/operationBased/fragments_with_defer_and_include_directives/fragment/CharacterDetails3Impl.kt.expected @@ -18,6 +18,8 @@ import kotlin.Boolean import kotlin.Int public class CharacterDetails3Impl() : Fragment { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_defer_and_include_directives/kotlin/operationBased/fragments_with_defer_and_include_directives/fragment/CharacterDetailsImpl.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_defer_and_include_directives/kotlin/operationBased/fragments_with_defer_and_include_directives/fragment/CharacterDetailsImpl.kt.expected index 4ec357954d2..429151aee34 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_defer_and_include_directives/kotlin/operationBased/fragments_with_defer_and_include_directives/fragment/CharacterDetailsImpl.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_defer_and_include_directives/kotlin/operationBased/fragments_with_defer_and_include_directives/fragment/CharacterDetailsImpl.kt.expected @@ -18,6 +18,8 @@ import kotlin.Boolean import kotlin.Int public class CharacterDetailsImpl() : Fragment { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_defer_and_include_directives/kotlin/operationBased/fragments_with_defer_and_include_directives/fragment/DroidDetailsImpl.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_defer_and_include_directives/kotlin/operationBased/fragments_with_defer_and_include_directives/fragment/DroidDetailsImpl.kt.expected index ef144536898..94d677a1b29 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_defer_and_include_directives/kotlin/operationBased/fragments_with_defer_and_include_directives/fragment/DroidDetailsImpl.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_defer_and_include_directives/kotlin/operationBased/fragments_with_defer_and_include_directives/fragment/DroidDetailsImpl.kt.expected @@ -18,6 +18,8 @@ import kotlin.Boolean import kotlin.Int public class DroidDetailsImpl() : Fragment { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_type_condition/java/operationBased/fragments_with_type_condition/TestQuery.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_type_condition/java/operationBased/fragments_with_type_condition/TestQuery.java.expected index e6123fa8c63..e389c39a099 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_type_condition/java/operationBased/fragments_with_type_condition/TestQuery.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_type_condition/java/operationBased/fragments_with_type_condition/TestQuery.java.expected @@ -134,6 +134,11 @@ public class TestQuery implements Query { .build(); } + @Override + public boolean getIgnoreErrors() { + return false; + } + public static final class Builder { Builder() { } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_type_condition/java/operationBased/fragments_with_type_condition/fragment/DroidDetailsImpl.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_type_condition/java/operationBased/fragments_with_type_condition/fragment/DroidDetailsImpl.java.expected index 3fd20747f8c..76986692c6a 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_type_condition/java/operationBased/fragments_with_type_condition/fragment/DroidDetailsImpl.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_type_condition/java/operationBased/fragments_with_type_condition/fragment/DroidDetailsImpl.java.expected @@ -79,4 +79,9 @@ public class DroidDetailsImpl implements Fragment { .selections(DroidDetailsSelections.__root) .build(); } + + @Override + public boolean getIgnoreErrors() { + return false; + } } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_type_condition/java/operationBased/fragments_with_type_condition/fragment/HumanDetailsImpl.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_type_condition/java/operationBased/fragments_with_type_condition/fragment/HumanDetailsImpl.java.expected index 6379f17373e..360f242aa7e 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_type_condition/java/operationBased/fragments_with_type_condition/fragment/HumanDetailsImpl.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_type_condition/java/operationBased/fragments_with_type_condition/fragment/HumanDetailsImpl.java.expected @@ -79,4 +79,9 @@ public class HumanDetailsImpl implements Fragment { .selections(HumanDetailsSelections.__root) .build(); } + + @Override + public boolean getIgnoreErrors() { + return false; + } } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_type_condition/kotlin/operationBased/fragments_with_type_condition/TestQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_type_condition/kotlin/operationBased/fragments_with_type_condition/TestQuery.kt.expected index 86262e101e6..4ca59805780 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_type_condition/kotlin/operationBased/fragments_with_type_condition/TestQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_type_condition/kotlin/operationBased/fragments_with_type_condition/TestQuery.kt.expected @@ -23,6 +23,8 @@ import kotlin.String import com.example.fragments_with_type_condition.type.Query as CompiledQuery public class TestQuery() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_type_condition/kotlin/operationBased/fragments_with_type_condition/fragment/DroidDetailsImpl.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_type_condition/kotlin/operationBased/fragments_with_type_condition/fragment/DroidDetailsImpl.kt.expected index 67712565504..2da568bd49c 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_type_condition/kotlin/operationBased/fragments_with_type_condition/fragment/DroidDetailsImpl.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_type_condition/kotlin/operationBased/fragments_with_type_condition/fragment/DroidDetailsImpl.kt.expected @@ -18,6 +18,8 @@ import kotlin.Boolean import kotlin.Int public class DroidDetailsImpl() : Fragment { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_type_condition/kotlin/operationBased/fragments_with_type_condition/fragment/HumanDetailsImpl.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_type_condition/kotlin/operationBased/fragments_with_type_condition/fragment/HumanDetailsImpl.kt.expected index d9794403717..bbcf1413c64 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_type_condition/kotlin/operationBased/fragments_with_type_condition/fragment/HumanDetailsImpl.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_type_condition/kotlin/operationBased/fragments_with_type_condition/fragment/HumanDetailsImpl.kt.expected @@ -18,6 +18,8 @@ import kotlin.Boolean import kotlin.Int public class HumanDetailsImpl() : Fragment { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_type_condition/kotlin/responseBased/fragments_with_type_condition/TestQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_type_condition/kotlin/responseBased/fragments_with_type_condition/TestQuery.kt.expected index c79761009e8..307539692cb 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_type_condition/kotlin/responseBased/fragments_with_type_condition/TestQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_type_condition/kotlin/responseBased/fragments_with_type_condition/TestQuery.kt.expected @@ -25,6 +25,8 @@ import kotlin.Suppress import com.example.fragments_with_type_condition.type.Query as CompiledQuery public class TestQuery() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_type_condition/kotlin/responseBased/fragments_with_type_condition/fragment/DroidDetailsImpl.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_type_condition/kotlin/responseBased/fragments_with_type_condition/fragment/DroidDetailsImpl.kt.expected index a869f6d49f2..2a60777182e 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_type_condition/kotlin/responseBased/fragments_with_type_condition/fragment/DroidDetailsImpl.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_type_condition/kotlin/responseBased/fragments_with_type_condition/fragment/DroidDetailsImpl.kt.expected @@ -19,6 +19,8 @@ import kotlin.Int import kotlin.String public class DroidDetailsImpl() : Fragment { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_type_condition/kotlin/responseBased/fragments_with_type_condition/fragment/HumanDetailsImpl.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_type_condition/kotlin/responseBased/fragments_with_type_condition/fragment/HumanDetailsImpl.kt.expected index 65ec2281388..0789323376e 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_type_condition/kotlin/responseBased/fragments_with_type_condition/fragment/HumanDetailsImpl.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/fragments_with_type_condition/kotlin/responseBased/fragments_with_type_condition/fragment/HumanDetailsImpl.kt.expected @@ -20,6 +20,8 @@ import kotlin.Int import kotlin.String public class HumanDetailsImpl() : Fragment { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/hero_details/java/operationBased/hero_details/HeroDetails.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/hero_details/java/operationBased/hero_details/HeroDetails.java.expected index 4e928061449..e52b80439b6 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/hero_details/java/operationBased/hero_details/HeroDetails.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/hero_details/java/operationBased/hero_details/HeroDetails.java.expected @@ -127,6 +127,11 @@ public class HeroDetails implements Query { .build(); } + @Override + public boolean getIgnoreErrors() { + return false; + } + public static final class Builder { Builder() { } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/hero_details/kotlin/responseBased/hero_details/HeroDetails.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/hero_details/kotlin/responseBased/hero_details/HeroDetails.kt.expected index 45db495bf45..a27572cb382 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/hero_details/kotlin/responseBased/hero_details/HeroDetails.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/hero_details/kotlin/responseBased/hero_details/HeroDetails.kt.expected @@ -23,6 +23,8 @@ import kotlin.collections.List import com.example.hero_details.type.Query as CompiledQuery public class HeroDetails() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/hero_details_semantic_naming/java/operationBased/hero_details_semantic_naming/HeroDetailsQuery.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/hero_details_semantic_naming/java/operationBased/hero_details_semantic_naming/HeroDetailsQuery.java.expected index bbc24133fa5..f93123ca5e8 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/hero_details_semantic_naming/java/operationBased/hero_details_semantic_naming/HeroDetailsQuery.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/hero_details_semantic_naming/java/operationBased/hero_details_semantic_naming/HeroDetailsQuery.java.expected @@ -125,6 +125,11 @@ public class HeroDetailsQuery implements Query { .build(); } + @Override + public boolean getIgnoreErrors() { + return false; + } + public static final class Builder { Builder() { } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/hero_details_semantic_naming/kotlin/responseBased/hero_details_semantic_naming/HeroDetailsQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/hero_details_semantic_naming/kotlin/responseBased/hero_details_semantic_naming/HeroDetailsQuery.kt.expected index 9af63736b29..6713b401abe 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/hero_details_semantic_naming/kotlin/responseBased/hero_details_semantic_naming/HeroDetailsQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/hero_details_semantic_naming/kotlin/responseBased/hero_details_semantic_naming/HeroDetailsQuery.kt.expected @@ -22,6 +22,8 @@ import kotlin.collections.List import com.example.hero_details_semantic_naming.type.Query as CompiledQuery public class HeroDetailsQuery() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/hero_name/java/operationBased/hero_name/TestQuery.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/hero_name/java/operationBased/hero_name/TestQuery.java.expected index 0c5bbb9270c..aeefd91a877 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/hero_name/java/operationBased/hero_name/TestQuery.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/hero_name/java/operationBased/hero_name/TestQuery.java.expected @@ -120,6 +120,11 @@ public class TestQuery implements Query { .build(); } + @Override + public boolean getIgnoreErrors() { + return false; + } + public static final class Builder { Builder() { } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/hero_name/kotlin/operationBased/hero_name/TestQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/hero_name/kotlin/operationBased/hero_name/TestQuery.kt.expected index 5d03ebfd9a4..1e357194229 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/hero_name/kotlin/operationBased/hero_name/TestQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/hero_name/kotlin/operationBased/hero_name/TestQuery.kt.expected @@ -21,6 +21,8 @@ import kotlin.String import com.example.hero_name.type.Query as CompiledQuery public class TestQuery() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/hero_name/kotlin/responseBased/hero_name/TestQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/hero_name/kotlin/responseBased/hero_name/TestQuery.kt.expected index de4b4fe10d1..7eb78bbfddc 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/hero_name/kotlin/responseBased/hero_name/TestQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/hero_name/kotlin/responseBased/hero_name/TestQuery.kt.expected @@ -22,6 +22,8 @@ import kotlin.Suppress import com.example.hero_name.type.Query as CompiledQuery public class TestQuery() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/hero_name_query_long_name/java/operationBased/hero_name_query_long_name/TestQueryWithAVeryAVeryAVeryAVeryAVeryAVeryAVeryAVeryAVeryAVeryAVeryAVeryAVeryLongName.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/hero_name_query_long_name/java/operationBased/hero_name_query_long_name/TestQueryWithAVeryAVeryAVeryAVeryAVeryAVeryAVeryAVeryAVeryAVeryAVeryAVeryAVeryLongName.java.expected index 9b604b83482..4a3f80d2dcd 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/hero_name_query_long_name/java/operationBased/hero_name_query_long_name/TestQueryWithAVeryAVeryAVeryAVeryAVeryAVeryAVeryAVeryAVeryAVeryAVeryAVeryAVeryLongName.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/hero_name_query_long_name/java/operationBased/hero_name_query_long_name/TestQueryWithAVeryAVeryAVeryAVeryAVeryAVeryAVeryAVeryAVeryAVeryAVeryAVeryAVeryLongName.java.expected @@ -125,6 +125,11 @@ public class TestQueryWithAVeryAVeryAVeryAVeryAVeryAVeryAVeryAVeryAVeryAVeryAVer .build(); } + @Override + public boolean getIgnoreErrors() { + return false; + } + public static final class Builder { private Optional episodeAVeryAVeryAVeryAVeryAVeryAVeryAVeryAVeryAVeryAVeryAVeryAVeryAVeryAVeryAVeryLongName = Optional.absent(); diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/hero_name_query_long_name/kotlin/responseBased/hero_name_query_long_name/TestQueryWithAVeryAVeryAVeryAVeryAVeryAVeryAVeryAVeryAVeryAVeryAVeryAVeryAVeryLongName.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/hero_name_query_long_name/kotlin/responseBased/hero_name_query_long_name/TestQueryWithAVeryAVeryAVeryAVeryAVeryAVeryAVeryAVeryAVeryAVeryAVeryAVeryAVeryLongName.kt.expected index f08480ca2e2..3693ae11ea0 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/hero_name_query_long_name/kotlin/responseBased/hero_name_query_long_name/TestQueryWithAVeryAVeryAVeryAVeryAVeryAVeryAVeryAVeryAVeryAVeryAVeryAVeryAVeryLongName.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/hero_name_query_long_name/kotlin/responseBased/hero_name_query_long_name/TestQueryWithAVeryAVeryAVeryAVeryAVeryAVeryAVeryAVeryAVeryAVeryAVeryAVeryAVeryLongName.kt.expected @@ -29,6 +29,8 @@ public data class ) : Query { + override val ignoreErrors: Boolean = false + override fun id(): String = OPERATION_ID override fun document(): String = OPERATION_DOCUMENT diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/hero_with_review/java/operationBased/hero_with_review/TestQuery.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/hero_with_review/java/operationBased/hero_with_review/TestQuery.java.expected index e47d6c7fe6c..6caef17d853 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/hero_with_review/java/operationBased/hero_with_review/TestQuery.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/hero_with_review/java/operationBased/hero_with_review/TestQuery.java.expected @@ -135,6 +135,11 @@ public class TestQuery implements Mutation { .build(); } + @Override + public boolean getIgnoreErrors() { + return false; + } + public static final class Builder { private Episode ep; diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/hero_with_review/kotlin/responseBased/hero_with_review/TestQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/hero_with_review/kotlin/responseBased/hero_with_review/TestQuery.kt.expected index 0678d2586dc..5bb268d735c 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/hero_with_review/kotlin/responseBased/hero_with_review/TestQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/hero_with_review/kotlin/responseBased/hero_with_review/TestQuery.kt.expected @@ -24,6 +24,8 @@ import com.example.hero_with_review.type.Mutation as CompiledMutation public data class TestQuery( public val ep: Episode, ) : Mutation { + override val ignoreErrors: Boolean = false + override fun id(): String = OPERATION_ID override fun document(): String = OPERATION_DOCUMENT diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/inline_fragment_for_non_optional_field/java/operationBased/inline_fragment_for_non_optional_field/TestQuery.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/inline_fragment_for_non_optional_field/java/operationBased/inline_fragment_for_non_optional_field/TestQuery.java.expected index f7f83486c72..8efc2547db5 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/inline_fragment_for_non_optional_field/java/operationBased/inline_fragment_for_non_optional_field/TestQuery.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/inline_fragment_for_non_optional_field/java/operationBased/inline_fragment_for_non_optional_field/TestQuery.java.expected @@ -120,6 +120,11 @@ public class TestQuery implements Query { .build(); } + @Override + public boolean getIgnoreErrors() { + return false; + } + public static final class Builder { Builder() { } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/inline_fragment_for_non_optional_field/kotlin/operationBased/inline_fragment_for_non_optional_field/TestQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/inline_fragment_for_non_optional_field/kotlin/operationBased/inline_fragment_for_non_optional_field/TestQuery.kt.expected index 18d09ff4de2..b49056d74d7 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/inline_fragment_for_non_optional_field/kotlin/operationBased/inline_fragment_for_non_optional_field/TestQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/inline_fragment_for_non_optional_field/kotlin/operationBased/inline_fragment_for_non_optional_field/TestQuery.kt.expected @@ -22,6 +22,8 @@ import kotlin.String import com.example.inline_fragment_for_non_optional_field.type.Query as CompiledQuery public class TestQuery() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/inline_fragment_for_non_optional_field/kotlin/responseBased/inline_fragment_for_non_optional_field/TestQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/inline_fragment_for_non_optional_field/kotlin/responseBased/inline_fragment_for_non_optional_field/TestQuery.kt.expected index a278dfa4e69..906a6c6368b 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/inline_fragment_for_non_optional_field/kotlin/responseBased/inline_fragment_for_non_optional_field/TestQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/inline_fragment_for_non_optional_field/kotlin/responseBased/inline_fragment_for_non_optional_field/TestQuery.kt.expected @@ -23,6 +23,8 @@ import kotlin.Suppress import com.example.inline_fragment_for_non_optional_field.type.Query as CompiledQuery public class TestQuery() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/inline_fragment_inside_inline_fragment/java/operationBased/inline_fragment_inside_inline_fragment/TestQuery.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/inline_fragment_inside_inline_fragment/java/operationBased/inline_fragment_inside_inline_fragment/TestQuery.java.expected index f987f4b1ab2..b51e25868d7 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/inline_fragment_inside_inline_fragment/java/operationBased/inline_fragment_inside_inline_fragment/TestQuery.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/inline_fragment_inside_inline_fragment/java/operationBased/inline_fragment_inside_inline_fragment/TestQuery.java.expected @@ -126,6 +126,11 @@ public class TestQuery implements Query { .build(); } + @Override + public boolean getIgnoreErrors() { + return false; + } + public static final class Builder { Builder() { } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/inline_fragment_inside_inline_fragment/kotlin/operationBased/inline_fragment_inside_inline_fragment/TestQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/inline_fragment_inside_inline_fragment/kotlin/operationBased/inline_fragment_inside_inline_fragment/TestQuery.kt.expected index 85219bfc04f..530aeef72a7 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/inline_fragment_inside_inline_fragment/kotlin/operationBased/inline_fragment_inside_inline_fragment/TestQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/inline_fragment_inside_inline_fragment/kotlin/operationBased/inline_fragment_inside_inline_fragment/TestQuery.kt.expected @@ -22,6 +22,8 @@ import kotlin.collections.List import com.example.inline_fragment_inside_inline_fragment.type.Query as CompiledQuery public class TestQuery() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/inline_fragment_inside_inline_fragment/kotlin/responseBased/inline_fragment_inside_inline_fragment/TestQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/inline_fragment_inside_inline_fragment/kotlin/responseBased/inline_fragment_inside_inline_fragment/TestQuery.kt.expected index c68030c8cec..5a18a44974e 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/inline_fragment_inside_inline_fragment/kotlin/responseBased/inline_fragment_inside_inline_fragment/TestQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/inline_fragment_inside_inline_fragment/kotlin/responseBased/inline_fragment_inside_inline_fragment/TestQuery.kt.expected @@ -23,6 +23,8 @@ import kotlin.collections.List import com.example.inline_fragment_inside_inline_fragment.type.Query as CompiledQuery public class TestQuery() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/inline_fragment_intersection/java/operationBased/inline_fragment_intersection/TestOperation.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/inline_fragment_intersection/java/operationBased/inline_fragment_intersection/TestOperation.java.expected index 14c60e565e7..7cd8a535ae7 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/inline_fragment_intersection/java/operationBased/inline_fragment_intersection/TestOperation.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/inline_fragment_intersection/java/operationBased/inline_fragment_intersection/TestOperation.java.expected @@ -154,6 +154,11 @@ public class TestOperation implements Query { .build(); } + @Override + public boolean getIgnoreErrors() { + return false; + } + public static final class Builder { Builder() { } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/inline_fragment_intersection/kotlin/operationBased/inline_fragment_intersection/TestOperation.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/inline_fragment_intersection/kotlin/operationBased/inline_fragment_intersection/TestOperation.kt.expected index 14ca71fa491..4e00f721d2b 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/inline_fragment_intersection/kotlin/operationBased/inline_fragment_intersection/TestOperation.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/inline_fragment_intersection/kotlin/operationBased/inline_fragment_intersection/TestOperation.kt.expected @@ -24,6 +24,8 @@ import kotlin.collections.List import com.example.inline_fragment_intersection.type.Query as CompiledQuery public class TestOperation() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/inline_fragment_intersection/kotlin/responseBased/inline_fragment_intersection/TestOperation.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/inline_fragment_intersection/kotlin/responseBased/inline_fragment_intersection/TestOperation.kt.expected index 3078a5ed91a..cf21661e2b5 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/inline_fragment_intersection/kotlin/responseBased/inline_fragment_intersection/TestOperation.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/inline_fragment_intersection/kotlin/responseBased/inline_fragment_intersection/TestOperation.kt.expected @@ -25,6 +25,8 @@ import kotlin.collections.List import com.example.inline_fragment_intersection.type.Query as CompiledQuery public class TestOperation() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/inline_fragment_merge_fields/java/operationBased/inline_fragment_merge_fields/TestQuery.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/inline_fragment_merge_fields/java/operationBased/inline_fragment_merge_fields/TestQuery.java.expected index 4780e1ec871..167d171e510 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/inline_fragment_merge_fields/java/operationBased/inline_fragment_merge_fields/TestQuery.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/inline_fragment_merge_fields/java/operationBased/inline_fragment_merge_fields/TestQuery.java.expected @@ -135,6 +135,11 @@ public class TestQuery implements Query { .build(); } + @Override + public boolean getIgnoreErrors() { + return false; + } + public static final class Builder { Builder() { } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/inline_fragment_merge_fields/kotlin/operationBased/inline_fragment_merge_fields/TestQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/inline_fragment_merge_fields/kotlin/operationBased/inline_fragment_merge_fields/TestQuery.kt.expected index a77dfc3ffda..c5d2afaac17 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/inline_fragment_merge_fields/kotlin/operationBased/inline_fragment_merge_fields/TestQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/inline_fragment_merge_fields/kotlin/operationBased/inline_fragment_merge_fields/TestQuery.kt.expected @@ -22,6 +22,8 @@ import kotlin.collections.List import com.example.inline_fragment_merge_fields.type.Query as CompiledQuery public class TestQuery() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/inline_fragment_merge_fields/kotlin/responseBased/inline_fragment_merge_fields/TestQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/inline_fragment_merge_fields/kotlin/responseBased/inline_fragment_merge_fields/TestQuery.kt.expected index a8bc3818151..485969af5d9 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/inline_fragment_merge_fields/kotlin/responseBased/inline_fragment_merge_fields/TestQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/inline_fragment_merge_fields/kotlin/responseBased/inline_fragment_merge_fields/TestQuery.kt.expected @@ -22,6 +22,8 @@ import kotlin.collections.List import com.example.inline_fragment_merge_fields.type.Query as CompiledQuery public class TestQuery() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/inline_fragment_simple/java/operationBased/inline_fragment_simple/TestQuery.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/inline_fragment_simple/java/operationBased/inline_fragment_simple/TestQuery.java.expected index 08d0054758f..c453f2074e3 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/inline_fragment_simple/java/operationBased/inline_fragment_simple/TestQuery.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/inline_fragment_simple/java/operationBased/inline_fragment_simple/TestQuery.java.expected @@ -119,6 +119,11 @@ public class TestQuery implements Query { .build(); } + @Override + public boolean getIgnoreErrors() { + return false; + } + public static final class Builder { Builder() { } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/inline_fragment_simple/kotlin/operationBased/inline_fragment_simple/TestQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/inline_fragment_simple/kotlin/operationBased/inline_fragment_simple/TestQuery.kt.expected index 6c073059052..66d7ef260cd 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/inline_fragment_simple/kotlin/operationBased/inline_fragment_simple/TestQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/inline_fragment_simple/kotlin/operationBased/inline_fragment_simple/TestQuery.kt.expected @@ -22,6 +22,8 @@ import kotlin.String import com.example.inline_fragment_simple.type.Query as CompiledQuery public class TestQuery() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/inline_fragment_simple/kotlin/responseBased/inline_fragment_simple/TestQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/inline_fragment_simple/kotlin/responseBased/inline_fragment_simple/TestQuery.kt.expected index 7412637ba37..ab85113ddcf 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/inline_fragment_simple/kotlin/responseBased/inline_fragment_simple/TestQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/inline_fragment_simple/kotlin/responseBased/inline_fragment_simple/TestQuery.kt.expected @@ -23,6 +23,8 @@ import kotlin.Suppress import com.example.inline_fragment_simple.type.Query as CompiledQuery public class TestQuery() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/inline_fragment_type_coercion/java/operationBased/inline_fragment_type_coercion/TestQuery.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/inline_fragment_type_coercion/java/operationBased/inline_fragment_type_coercion/TestQuery.java.expected index 947d1880807..b013529de77 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/inline_fragment_type_coercion/java/operationBased/inline_fragment_type_coercion/TestQuery.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/inline_fragment_type_coercion/java/operationBased/inline_fragment_type_coercion/TestQuery.java.expected @@ -119,6 +119,11 @@ public class TestQuery implements Query { .build(); } + @Override + public boolean getIgnoreErrors() { + return false; + } + public static final class Builder { Builder() { } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/inline_fragment_type_coercion/kotlin/operationBased/inline_fragment_type_coercion/TestQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/inline_fragment_type_coercion/kotlin/operationBased/inline_fragment_type_coercion/TestQuery.kt.expected index 8d7a078d0a8..26b8b797013 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/inline_fragment_type_coercion/kotlin/operationBased/inline_fragment_type_coercion/TestQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/inline_fragment_type_coercion/kotlin/operationBased/inline_fragment_type_coercion/TestQuery.kt.expected @@ -21,6 +21,8 @@ import kotlin.String import com.example.inline_fragment_type_coercion.type.Query as CompiledQuery public class TestQuery() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/inline_fragment_type_coercion/kotlin/responseBased/inline_fragment_type_coercion/TestQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/inline_fragment_type_coercion/kotlin/responseBased/inline_fragment_type_coercion/TestQuery.kt.expected index e7b05ac141d..142132beb85 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/inline_fragment_type_coercion/kotlin/responseBased/inline_fragment_type_coercion/TestQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/inline_fragment_type_coercion/kotlin/responseBased/inline_fragment_type_coercion/TestQuery.kt.expected @@ -22,6 +22,8 @@ import kotlin.Suppress import com.example.inline_fragment_type_coercion.type.Query as CompiledQuery public class TestQuery() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/inline_fragment_with_include_directive/java/operationBased/inline_fragment_with_include_directive/TestQuery.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/inline_fragment_with_include_directive/java/operationBased/inline_fragment_with_include_directive/TestQuery.java.expected index 8fd79c055d1..3e0a6885bc1 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/inline_fragment_with_include_directive/java/operationBased/inline_fragment_with_include_directive/TestQuery.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/inline_fragment_with_include_directive/java/operationBased/inline_fragment_with_include_directive/TestQuery.java.expected @@ -142,6 +142,11 @@ public class TestQuery implements Query { .build(); } + @Override + public boolean getIgnoreErrors() { + return false; + } + public static final class Builder { private Boolean withDetails; diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/inline_fragment_with_include_directive/kotlin/operationBased/inline_fragment_with_include_directive/TestQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/inline_fragment_with_include_directive/kotlin/operationBased/inline_fragment_with_include_directive/TestQuery.kt.expected index c6b4d46720d..24b409dd8a5 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/inline_fragment_with_include_directive/kotlin/operationBased/inline_fragment_with_include_directive/TestQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/inline_fragment_with_include_directive/kotlin/operationBased/inline_fragment_with_include_directive/TestQuery.kt.expected @@ -23,6 +23,8 @@ public data class TestQuery( public val withDetails: Boolean, public val skipHumanDetails: Boolean, ) : Query { + override val ignoreErrors: Boolean = false + override fun id(): String = OPERATION_ID override fun document(): String = OPERATION_DOCUMENT diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/inline_fragments_with_friends/java/operationBased/inline_fragments_with_friends/TestQuery.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/inline_fragments_with_friends/java/operationBased/inline_fragments_with_friends/TestQuery.java.expected index c7ef9453f03..89a0ff80d72 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/inline_fragments_with_friends/java/operationBased/inline_fragments_with_friends/TestQuery.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/inline_fragments_with_friends/java/operationBased/inline_fragments_with_friends/TestQuery.java.expected @@ -131,6 +131,11 @@ public class TestQuery implements Query { .build(); } + @Override + public boolean getIgnoreErrors() { + return false; + } + public static final class Builder { Builder() { } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/inline_fragments_with_friends/kotlin/operationBased/inline_fragments_with_friends/TestQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/inline_fragments_with_friends/kotlin/operationBased/inline_fragments_with_friends/TestQuery.kt.expected index da4a6fb3e11..a4fab75130e 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/inline_fragments_with_friends/kotlin/operationBased/inline_fragments_with_friends/TestQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/inline_fragments_with_friends/kotlin/operationBased/inline_fragments_with_friends/TestQuery.kt.expected @@ -24,6 +24,8 @@ import kotlin.collections.List import com.example.inline_fragments_with_friends.type.Query as CompiledQuery public class TestQuery() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/inline_fragments_with_friends/kotlin/responseBased/inline_fragments_with_friends/TestQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/inline_fragments_with_friends/kotlin/responseBased/inline_fragments_with_friends/TestQuery.kt.expected index ab20c6b842d..cdb6e9db77c 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/inline_fragments_with_friends/kotlin/responseBased/inline_fragments_with_friends/TestQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/inline_fragments_with_friends/kotlin/responseBased/inline_fragments_with_friends/TestQuery.kt.expected @@ -25,6 +25,8 @@ import kotlin.collections.List import com.example.inline_fragments_with_friends.type.Query as CompiledQuery public class TestQuery() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/input_object_oneof/java/operationBased/input_object_oneof/FindUserQuery.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/input_object_oneof/java/operationBased/input_object_oneof/FindUserQuery.java.expected index f57de553b80..e1b3b924dbf 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/input_object_oneof/java/operationBased/input_object_oneof/FindUserQuery.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/input_object_oneof/java/operationBased/input_object_oneof/FindUserQuery.java.expected @@ -123,6 +123,11 @@ public class FindUserQuery implements Query { .build(); } + @Override + public boolean getIgnoreErrors() { + return false; + } + public static final class Builder { private FindUserInput findUserInput; diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/input_object_oneof/kotlin/responseBased/input_object_oneof/FindUserQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/input_object_oneof/kotlin/responseBased/input_object_oneof/FindUserQuery.kt.expected index e7401634d98..67ca8470a82 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/input_object_oneof/kotlin/responseBased/input_object_oneof/FindUserQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/input_object_oneof/kotlin/responseBased/input_object_oneof/FindUserQuery.kt.expected @@ -23,6 +23,8 @@ import com.example.input_object_oneof.type.Query as CompiledQuery public data class FindUserQuery( public val findUserInput: FindUserInput, ) : Query { + override val ignoreErrors: Boolean = false + override fun id(): String = OPERATION_ID override fun document(): String = OPERATION_DOCUMENT diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/input_object_type/java/operationBased/input_object_type/TestQuery.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/input_object_type/java/operationBased/input_object_type/TestQuery.java.expected index 096a278ea4f..fb6fc398090 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/input_object_type/java/operationBased/input_object_type/TestQuery.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/input_object_type/java/operationBased/input_object_type/TestQuery.java.expected @@ -133,6 +133,11 @@ public class TestQuery implements Mutation { .build(); } + @Override + public boolean getIgnoreErrors() { + return false; + } + public static final class Builder { private Episode ep; diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/input_object_type/kotlin/responseBased/input_object_type/TestQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/input_object_type/kotlin/responseBased/input_object_type/TestQuery.kt.expected index 3029cc4f2c0..202a053dc6e 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/input_object_type/kotlin/responseBased/input_object_type/TestQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/input_object_type/kotlin/responseBased/input_object_type/TestQuery.kt.expected @@ -26,6 +26,8 @@ public data class TestQuery( public val ep: Episode, public val review: ReviewInput, ) : Mutation { + override val ignoreErrors: Boolean = false + override fun id(): String = OPERATION_ID override fun document(): String = OPERATION_DOCUMENT diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/input_object_variable_and_argument/java/operationBased/input_object_variable_and_argument/TestQuery.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/input_object_variable_and_argument/java/operationBased/input_object_variable_and_argument/TestQuery.java.expected index 5dee517f824..a92d2e9267f 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/input_object_variable_and_argument/java/operationBased/input_object_variable_and_argument/TestQuery.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/input_object_variable_and_argument/java/operationBased/input_object_variable_and_argument/TestQuery.java.expected @@ -152,6 +152,11 @@ public class TestQuery implements Query { .build(); } + @Override + public boolean getIgnoreErrors() { + return false; + } + public static final class Builder { private Optional episode = Optional.absent(); diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/input_object_variable_and_argument/kotlin/responseBased/input_object_variable_and_argument/TestQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/input_object_variable_and_argument/kotlin/responseBased/input_object_variable_and_argument/TestQuery.kt.expected index eb3474a8e41..2dfa2026468 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/input_object_variable_and_argument/kotlin/responseBased/input_object_variable_and_argument/TestQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/input_object_variable_and_argument/kotlin/responseBased/input_object_variable_and_argument/TestQuery.kt.expected @@ -28,6 +28,8 @@ public data class TestQuery( public val stars: Int, public val greenValue: Double, ) : Query { + override val ignoreErrors: Boolean = false + override fun id(): String = OPERATION_ID override fun document(): String = OPERATION_DOCUMENT diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/input_object_variable_and_argument_with_generated_methods/java/operationBased/input_object_variable_and_argument_with_generated_methods/TestQuery.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/input_object_variable_and_argument_with_generated_methods/java/operationBased/input_object_variable_and_argument_with_generated_methods/TestQuery.java.expected index 1340f939153..1db3f59b0e2 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/input_object_variable_and_argument_with_generated_methods/java/operationBased/input_object_variable_and_argument_with_generated_methods/TestQuery.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/input_object_variable_and_argument_with_generated_methods/java/operationBased/input_object_variable_and_argument_with_generated_methods/TestQuery.java.expected @@ -152,6 +152,11 @@ public class TestQuery implements Query { .build(); } + @Override + public boolean getIgnoreErrors() { + return false; + } + public static final class Builder { private Optional episode = Optional.absent(); diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/input_object_variable_and_argument_with_generated_methods/kotlin/responseBased/input_object_variable_and_argument_with_generated_methods/TestQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/input_object_variable_and_argument_with_generated_methods/kotlin/responseBased/input_object_variable_and_argument_with_generated_methods/TestQuery.kt.expected index 7a3bf0ca6af..dd5da1a8617 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/input_object_variable_and_argument_with_generated_methods/kotlin/responseBased/input_object_variable_and_argument_with_generated_methods/TestQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/input_object_variable_and_argument_with_generated_methods/kotlin/responseBased/input_object_variable_and_argument_with_generated_methods/TestQuery.kt.expected @@ -31,6 +31,8 @@ public class TestQuery( ) : Query { private var __hashCode: Int? = null + override val ignoreErrors: Boolean = false + override fun hashCode(): Int { if (__hashCode == null) { var __h = episode.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/interface_always_nested/java/operationBased/interface_always_nested/TestQuery.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/interface_always_nested/java/operationBased/interface_always_nested/TestQuery.java.expected index 88094b9dfeb..3078b4689cb 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/interface_always_nested/java/operationBased/interface_always_nested/TestQuery.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/interface_always_nested/java/operationBased/interface_always_nested/TestQuery.java.expected @@ -122,6 +122,11 @@ public class TestQuery implements Query { .build(); } + @Override + public boolean getIgnoreErrors() { + return false; + } + public static final class Builder { Builder() { } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/interface_always_nested/kotlin/operationBased/interface_always_nested/TestQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/interface_always_nested/kotlin/operationBased/interface_always_nested/TestQuery.kt.expected index a1ff9ee06e5..617362c3756 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/interface_always_nested/kotlin/operationBased/interface_always_nested/TestQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/interface_always_nested/kotlin/operationBased/interface_always_nested/TestQuery.kt.expected @@ -21,6 +21,8 @@ import kotlin.String import com.example.interface_always_nested.type.Query as CompiledQuery public class TestQuery() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/interface_always_nested/kotlin/responseBased/interface_always_nested/TestQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/interface_always_nested/kotlin/responseBased/interface_always_nested/TestQuery.kt.expected index 831ac529806..a6b5e1f99e2 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/interface_always_nested/kotlin/responseBased/interface_always_nested/TestQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/interface_always_nested/kotlin/responseBased/interface_always_nested/TestQuery.kt.expected @@ -22,6 +22,8 @@ import kotlin.Suppress import com.example.interface_always_nested.type.Query as CompiledQuery public class TestQuery() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/interface_on_interface/java/operationBased/interface_on_interface/GetHuman.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/interface_on_interface/java/operationBased/interface_on_interface/GetHuman.java.expected index 0acb1062c00..c681fbc421e 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/interface_on_interface/java/operationBased/interface_on_interface/GetHuman.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/interface_on_interface/java/operationBased/interface_on_interface/GetHuman.java.expected @@ -124,6 +124,11 @@ public class GetHuman implements Query { .build(); } + @Override + public boolean getIgnoreErrors() { + return false; + } + public static final class Builder { Builder() { } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/interface_on_interface/kotlin/operationBased/interface_on_interface/GetHuman.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/interface_on_interface/kotlin/operationBased/interface_on_interface/GetHuman.kt.expected index 5309bdab88b..2f46f9fdee2 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/interface_on_interface/kotlin/operationBased/interface_on_interface/GetHuman.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/interface_on_interface/kotlin/operationBased/interface_on_interface/GetHuman.kt.expected @@ -22,6 +22,8 @@ import kotlin.String import com.example.interface_on_interface.type.Query as CompiledQuery public class GetHuman() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/interface_on_interface/kotlin/responseBased/interface_on_interface/GetHuman.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/interface_on_interface/kotlin/responseBased/interface_on_interface/GetHuman.kt.expected index 36b052a1e0a..bc0ee7c81c3 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/interface_on_interface/kotlin/responseBased/interface_on_interface/GetHuman.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/interface_on_interface/kotlin/responseBased/interface_on_interface/GetHuman.kt.expected @@ -23,6 +23,8 @@ import kotlin.Suppress import com.example.interface_on_interface.type.Query as CompiledQuery public class GetHuman() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/introspection_query/java/operationBased/introspection_query/TestQuery.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/introspection_query/java/operationBased/introspection_query/TestQuery.java.expected index dd3ca0c99be..cd0cd1d69c5 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/introspection_query/java/operationBased/introspection_query/TestQuery.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/introspection_query/java/operationBased/introspection_query/TestQuery.java.expected @@ -126,6 +126,11 @@ public class TestQuery implements Query { .build(); } + @Override + public boolean getIgnoreErrors() { + return false; + } + public static final class Builder { Builder() { } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/introspection_query/kotlin/responseBased/introspection_query/TestQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/introspection_query/kotlin/responseBased/introspection_query/TestQuery.kt.expected index ca779f5057b..45509342c88 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/introspection_query/kotlin/responseBased/introspection_query/TestQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/introspection_query/kotlin/responseBased/introspection_query/TestQuery.kt.expected @@ -23,6 +23,8 @@ import kotlin.collections.List import com.example.introspection_query.type.Query as CompiledQuery public class TestQuery() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/java8annotation/java/operationBased/java8annotation/LoginBarber.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/java8annotation/java/operationBased/java8annotation/LoginBarber.java.expected index 9f3bff95093..8790def77f7 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/java8annotation/java/operationBased/java8annotation/LoginBarber.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/java8annotation/java/operationBased/java8annotation/LoginBarber.java.expected @@ -124,6 +124,11 @@ public class LoginBarber implements Mutation { .build(); } + @Override + public boolean getIgnoreErrors() { + return false; + } + public static final class Builder { private com.example.java8annotation.type.Login input; diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/java8annotation/kotlin/responseBased/java8annotation/LoginBarber.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/java8annotation/kotlin/responseBased/java8annotation/LoginBarber.kt.expected index 27dcae8d839..09b3dd1105a 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/java8annotation/kotlin/responseBased/java8annotation/LoginBarber.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/java8annotation/kotlin/responseBased/java8annotation/LoginBarber.kt.expected @@ -23,6 +23,8 @@ import com.example.java8annotation.type.Mutation as CompiledMutation public data class LoginBarber( public val input: Login, ) : Mutation { + override val ignoreErrors: Boolean = false + override fun id(): String = OPERATION_ID override fun document(): String = OPERATION_DOCUMENT diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/java_android_annotations/java/operationBased/java_android_annotations/MyQuery.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/java_android_annotations/java/operationBased/java_android_annotations/MyQuery.java.expected index bc1125fa675..a7f74bb24d0 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/java_android_annotations/java/operationBased/java_android_annotations/MyQuery.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/java_android_annotations/java/operationBased/java_android_annotations/MyQuery.java.expected @@ -183,6 +183,11 @@ public class MyQuery implements Query { .build(); } + @Override + public boolean getIgnoreErrors() { + return false; + } + public static final class Builder { private Optional nullableInt = Optional.absent(); diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/java_android_annotations/kotlin/responseBased/java_android_annotations/MyQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/java_android_annotations/kotlin/responseBased/java_android_annotations/MyQuery.kt.expected index a34eb4f65d2..3deced57258 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/java_android_annotations/kotlin/responseBased/java_android_annotations/MyQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/java_android_annotations/kotlin/responseBased/java_android_annotations/MyQuery.kt.expected @@ -31,6 +31,8 @@ public data class MyQuery( public val nonNullableInput: MyInput, public val nonNullableInputWithDefault: Optional = Optional.Absent, ) : Query { + override val ignoreErrors: Boolean = false + override fun id(): String = OPERATION_ID override fun document(): String = OPERATION_DOCUMENT diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/java_apollo_optionals/java/operationBased/java_apollo_optionals/MyQuery.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/java_apollo_optionals/java/operationBased/java_apollo_optionals/MyQuery.java.expected index 368c82d6a9f..707e2f5fe3c 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/java_apollo_optionals/java/operationBased/java_apollo_optionals/MyQuery.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/java_apollo_optionals/java/operationBased/java_apollo_optionals/MyQuery.java.expected @@ -176,6 +176,11 @@ public class MyQuery implements Query { .build(); } + @Override + public boolean getIgnoreErrors() { + return false; + } + public static final class Builder { private Optional> nullableInt = Optional.absent(); diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/java_apollo_optionals/kotlin/responseBased/java_apollo_optionals/MyQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/java_apollo_optionals/kotlin/responseBased/java_apollo_optionals/MyQuery.kt.expected index 2e61fabfdbe..c5c46b4a67c 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/java_apollo_optionals/kotlin/responseBased/java_apollo_optionals/MyQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/java_apollo_optionals/kotlin/responseBased/java_apollo_optionals/MyQuery.kt.expected @@ -31,6 +31,8 @@ public data class MyQuery( public val nonNullableInput: MyInput, public val nonNullableInputWithDefault: Optional = Optional.Absent, ) : Query { + override val ignoreErrors: Boolean = false + override fun id(): String = OPERATION_ID override fun document(): String = OPERATION_DOCUMENT diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/java_guava_optionals/java/operationBased/java_guava_optionals/MyQuery.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/java_guava_optionals/java/operationBased/java_guava_optionals/MyQuery.java.expected index 8552323c5d7..2accba80998 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/java_guava_optionals/java/operationBased/java_guava_optionals/MyQuery.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/java_guava_optionals/java/operationBased/java_guava_optionals/MyQuery.java.expected @@ -176,6 +176,11 @@ public class MyQuery implements Query { .build(); } + @Override + public boolean getIgnoreErrors() { + return false; + } + public static final class Builder { private Optional> nullableInt = Optional.absent(); diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/java_guava_optionals/kotlin/responseBased/java_guava_optionals/MyQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/java_guava_optionals/kotlin/responseBased/java_guava_optionals/MyQuery.kt.expected index fd6caeda043..42df8e63d75 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/java_guava_optionals/kotlin/responseBased/java_guava_optionals/MyQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/java_guava_optionals/kotlin/responseBased/java_guava_optionals/MyQuery.kt.expected @@ -31,6 +31,8 @@ public data class MyQuery( public val nonNullableInput: MyInput, public val nonNullableInputWithDefault: Optional = Optional.Absent, ) : Query { + override val ignoreErrors: Boolean = false + override fun id(): String = OPERATION_ID override fun document(): String = OPERATION_DOCUMENT diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/java_hashcode/java/operationBased/java_hashcode/TestQuery.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/java_hashcode/java/operationBased/java_hashcode/TestQuery.java.expected index 4b50f31d284..d9157bc88dc 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/java_hashcode/java/operationBased/java_hashcode/TestQuery.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/java_hashcode/java/operationBased/java_hashcode/TestQuery.java.expected @@ -114,6 +114,11 @@ public class TestQuery implements Query { .build(); } + @Override + public boolean getIgnoreErrors() { + return false; + } + public static final class Builder { Builder() { } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/java_hashcode/kotlin/responseBased/java_hashcode/TestQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/java_hashcode/kotlin/responseBased/java_hashcode/TestQuery.kt.expected index 50e53ae3cc2..c0f1454aeea 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/java_hashcode/kotlin/responseBased/java_hashcode/TestQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/java_hashcode/kotlin/responseBased/java_hashcode/TestQuery.kt.expected @@ -21,6 +21,8 @@ import kotlin.String import com.example.java_hashcode.type.Query as CompiledQuery public class TestQuery() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/java_java_optionals/java/operationBased/java_java_optionals/MyQuery.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/java_java_optionals/java/operationBased/java_java_optionals/MyQuery.java.expected index 58d03fa5bf0..b48957f4458 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/java_java_optionals/java/operationBased/java_java_optionals/MyQuery.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/java_java_optionals/java/operationBased/java_java_optionals/MyQuery.java.expected @@ -176,6 +176,11 @@ public class MyQuery implements Query { .build(); } + @Override + public boolean getIgnoreErrors() { + return false; + } + public static final class Builder { private Optional> nullableInt = Optional.empty(); diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/java_java_optionals/kotlin/responseBased/java_java_optionals/MyQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/java_java_optionals/kotlin/responseBased/java_java_optionals/MyQuery.kt.expected index 064024f3531..7b68efd6a42 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/java_java_optionals/kotlin/responseBased/java_java_optionals/MyQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/java_java_optionals/kotlin/responseBased/java_java_optionals/MyQuery.kt.expected @@ -31,6 +31,8 @@ public data class MyQuery( public val nonNullableInput: MyInput, public val nonNullableInputWithDefault: Optional = Optional.Absent, ) : Query { + override val ignoreErrors: Boolean = false + override fun id(): String = OPERATION_ID override fun document(): String = OPERATION_DOCUMENT diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/java_jetbrains_annotations/java/operationBased/java_jetbrains_annotations/MyQuery.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/java_jetbrains_annotations/java/operationBased/java_jetbrains_annotations/MyQuery.java.expected index 465edc6753b..3670a795372 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/java_jetbrains_annotations/java/operationBased/java_jetbrains_annotations/MyQuery.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/java_jetbrains_annotations/java/operationBased/java_jetbrains_annotations/MyQuery.java.expected @@ -183,6 +183,11 @@ public class MyQuery implements Query { .build(); } + @Override + public boolean getIgnoreErrors() { + return false; + } + public static final class Builder { private Optional<@Nullable Integer> nullableInt = Optional.absent(); diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/java_jetbrains_annotations/kotlin/responseBased/java_jetbrains_annotations/MyQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/java_jetbrains_annotations/kotlin/responseBased/java_jetbrains_annotations/MyQuery.kt.expected index f09b5f4140d..58d3a3d372b 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/java_jetbrains_annotations/kotlin/responseBased/java_jetbrains_annotations/MyQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/java_jetbrains_annotations/kotlin/responseBased/java_jetbrains_annotations/MyQuery.kt.expected @@ -31,6 +31,8 @@ public data class MyQuery( public val nonNullableInput: MyInput, public val nonNullableInputWithDefault: Optional = Optional.Absent, ) : Query { + override val ignoreErrors: Boolean = false + override fun id(): String = OPERATION_ID override fun document(): String = OPERATION_DOCUMENT diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/java_jsr305_annotations/java/operationBased/java_jsr305_annotations/MyQuery.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/java_jsr305_annotations/java/operationBased/java_jsr305_annotations/MyQuery.java.expected index 11dfee4582d..1529539d7cf 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/java_jsr305_annotations/java/operationBased/java_jsr305_annotations/MyQuery.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/java_jsr305_annotations/java/operationBased/java_jsr305_annotations/MyQuery.java.expected @@ -183,6 +183,11 @@ public class MyQuery implements Query { .build(); } + @Override + public boolean getIgnoreErrors() { + return false; + } + public static final class Builder { private Optional nullableInt = Optional.absent(); diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/java_jsr305_annotations/kotlin/responseBased/java_jsr305_annotations/MyQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/java_jsr305_annotations/kotlin/responseBased/java_jsr305_annotations/MyQuery.kt.expected index 431f2750535..f303f5333fe 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/java_jsr305_annotations/kotlin/responseBased/java_jsr305_annotations/MyQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/java_jsr305_annotations/kotlin/responseBased/java_jsr305_annotations/MyQuery.kt.expected @@ -31,6 +31,8 @@ public data class MyQuery( public val nonNullableInput: MyInput, public val nonNullableInputWithDefault: Optional = Optional.Absent, ) : Query { + override val ignoreErrors: Boolean = false + override fun id(): String = OPERATION_ID override fun document(): String = OPERATION_DOCUMENT diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/java_primitive_types/java/operationBased/java_primitive_types/JavaPrimitiveQuery.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/java_primitive_types/java/operationBased/java_primitive_types/JavaPrimitiveQuery.java.expected index d8eafccf54d..f1e2b152efa 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/java_primitive_types/java/operationBased/java_primitive_types/JavaPrimitiveQuery.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/java_primitive_types/java/operationBased/java_primitive_types/JavaPrimitiveQuery.java.expected @@ -172,6 +172,11 @@ public class JavaPrimitiveQuery implements Query { .build(); } + @Override + public boolean getIgnoreErrors() { + return false; + } + public static final class Builder { private Optional nullableInt = Optional.absent(); diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/java_primitive_types/kotlin/responseBased/java_primitive_types/JavaPrimitiveQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/java_primitive_types/kotlin/responseBased/java_primitive_types/JavaPrimitiveQuery.kt.expected index 3b1c1422e8a..7e1b806aae6 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/java_primitive_types/kotlin/responseBased/java_primitive_types/JavaPrimitiveQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/java_primitive_types/kotlin/responseBased/java_primitive_types/JavaPrimitiveQuery.kt.expected @@ -30,6 +30,8 @@ public data class JavaPrimitiveQuery( public val nonNullableInput: MyInput, public val nonNullableInputWithDefault: Optional = Optional.Absent, ) : Query { + override val ignoreErrors: Boolean = false + override fun id(): String = OPERATION_ID override fun document(): String = OPERATION_DOCUMENT diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/list_field_clash/java/operationBased/list_field_clash/TestQuery.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/list_field_clash/java/operationBased/list_field_clash/TestQuery.java.expected index 93d3bbd9123..91deca42d06 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/list_field_clash/java/operationBased/list_field_clash/TestQuery.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/list_field_clash/java/operationBased/list_field_clash/TestQuery.java.expected @@ -117,6 +117,11 @@ public class TestQuery implements Query { .build(); } + @Override + public boolean getIgnoreErrors() { + return false; + } + public static final class Builder { Builder() { } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/list_field_clash/kotlin/responseBased/list_field_clash/TestQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/list_field_clash/kotlin/responseBased/list_field_clash/TestQuery.kt.expected index c11ba22e0f6..7e1620690ec 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/list_field_clash/kotlin/responseBased/list_field_clash/TestQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/list_field_clash/kotlin/responseBased/list_field_clash/TestQuery.kt.expected @@ -22,6 +22,8 @@ import kotlin.collections.List import com.example.list_field_clash.type.Query as CompiledQuery public class TestQuery() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/measurements b/libraries/apollo-compiler/src/test/graphql/com/example/measurements index 03b5f4c8d3f..980a522c7b5 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/measurements +++ b/libraries/apollo-compiler/src/test/graphql/com/example/measurements @@ -2,247 +2,247 @@ // If you updated the codegen and test fixtures, you should commit this file too. Test: Total LOC: -aggregate-all 196571 -aggregate-kotlin-responseBased 62902 -aggregate-kotlin-operationBased 40747 +aggregate-all 197830 +aggregate-kotlin-responseBased 63172 +aggregate-kotlin-operationBased 40971 aggregate-kotlin-compat 0 -aggregate-java-operationBased 92922 +aggregate-java-operationBased 93687 -java-operationBased-fragments_with_defer_and_include_directives 5530 -kotlin-operationBased-fragments_with_defer_and_include_directives 3486 -java-operationBased-data_builders 2926 -kotlin-responseBased-fragment_with_inline_fragment 2402 -java-operationBased-mutation_create_review 2366 -kotlin-responseBased-data_builders 2271 -java-operationBased-fragment_with_inline_fragment 2221 -kotlin-operationBased-data_builders 1920 -java-operationBased-nested_named_fragments 1858 -java-operationBased-union_inline_fragments 1632 -java-operationBased-fragment_spread_with_include_directive 1617 -java-operationBased-unique_type_name 1615 -kotlin-responseBased-nested_named_fragments 1611 -java-operationBased-inline_fragment_intersection 1598 -java-operationBased-input_object_type 1584 -java-operationBased-mutation_create_review_semantic_naming 1568 -java-operationBased-root_query_fragment_with_nested_fragments 1561 -java-operationBased-simple_fragment 1463 -java-operationBased-named_fragment_delegate 1460 -kotlin-responseBased-mutation_create_review 1386 -kotlin-responseBased-named_fragment_delegate 1355 -java-operationBased-named_fragment_with_variables 1352 -kotlin-responseBased-unique_type_name 1339 -java-operationBased-nested_conditional_inline 1293 -kotlin-operationBased-fragment_with_inline_fragment 1277 -java-operationBased-fragment_used_twice 1272 -java-operationBased-multiple_fragments 1260 -kotlin-responseBased-root_query_fragment_with_nested_fragments 1255 -java-operationBased-nested_field_with_multiple_fieldsets 1254 -kotlin-responseBased-input_object_type 1238 -kotlin-operationBased-nested_named_fragments 1237 -java-operationBased-two_heroes_with_friends 1211 -kotlin-responseBased-inline_fragment_intersection 1209 -java-operationBased-inline_fragment_merge_fields 1209 -kotlin-responseBased-simple_fragment 1166 -java-operationBased-named_fragment_inside_inline_fragment 1160 -java-operationBased-fragments_with_type_condition 1154 -kotlin-responseBased-fragment_used_twice 1140 -java-operationBased-target_name 1126 -kotlin-operationBased-inline_fragment_intersection 1118 -kotlin-operationBased-union_inline_fragments 1115 -kotlin-responseBased-union_inline_fragments 1115 -java-operationBased-root_query_inline_fragment 1094 -kotlin-operationBased-unique_type_name 1094 -kotlin-responseBased-fragments_with_type_condition 1093 -java-operationBased-java_jetbrains_annotations 1093 -java-operationBased-java_android_annotations 1090 -java-operationBased-java_jsr305_annotations 1090 -kotlin-operationBased-fragment_spread_with_include_directive 1089 -java-operationBased-java_guava_optionals 1074 -java-operationBased-java_java_optionals 1074 -java-operationBased-java_apollo_optionals 1073 -kotlin-responseBased-multiple_fragments 1052 -java-operationBased-simple_fragment_with_inline_fragments 1046 -kotlin-responseBased-simple_fragment_with_inline_fragments 1045 -java-operationBased-inline_fragments_with_friends 1036 -kotlin-operationBased-root_query_fragment_with_nested_fragments 1033 -kotlin-responseBased-nested_conditional_inline 1031 -java-operationBased-fragment_spread_with_nested_fields 1030 -kotlin-responseBased-named_fragment_with_variables 1020 -java-operationBased-operationbased2_ex8 1020 -java-operationBased-java_primitive_types 1018 -kotlin-operationBased-simple_fragment 1014 -kotlin-operationBased-named_fragment_delegate 997 -java-operationBased-decapitalized_fields 971 -java-operationBased-fragments_same_type_condition 947 -java-operationBased-simple_union 946 -kotlin-responseBased-operationbased2_ex8 945 -java-operationBased-deprecated_merged_field 926 -java-operationBased-hero_details 919 -java-operationBased-not_all_combinations_are_needed 916 -java-operationBased-input_object_oneof 913 -java-operationBased-simple_inline_fragment 901 -java-operationBased-fieldset_with_multiple_super 900 -kotlin-operationBased-nested_conditional_inline 897 -java-operationBased-inline_fragment_with_include_directive 895 -java-operationBased-introspection_query 889 -kotlin-responseBased-mutation_create_review_semantic_naming 878 -kotlin-operationBased-fragment_used_twice 876 -kotlin-operationBased-named_fragment_with_variables 871 -kotlin-responseBased-fragment_spread_with_nested_fields 867 -java-operationBased-test_inline 864 -java-operationBased-union_fragment 861 -java-operationBased-inline_fragment_inside_inline_fragment 853 -kotlin-responseBased-nested_field_with_multiple_fieldsets 830 -kotlin-operationBased-multiple_fragments 828 -kotlin-operationBased-fragments_with_type_condition 824 -java-operationBased-named_fragment_without_implementation 821 -kotlin-operationBased-nested_field_with_multiple_fieldsets 800 -kotlin-operationBased-inline_fragment_merge_fields 794 -kotlin-responseBased-two_heroes_with_friends 793 -kotlin-operationBased-named_fragment_inside_inline_fragment 791 -java-operationBased-fragment_with_multiple_fieldsets 784 -java-operationBased-hero_details_semantic_naming 783 -java-operationBased-operationbased2_ex7 781 -kotlin-responseBased-inline_fragments_with_friends 780 -kotlin-responseBased-target_name 775 -kotlin-operationBased-root_query_inline_fragment 774 -kotlin-responseBased-named_fragment_inside_inline_fragment 772 -java-operationBased-suppressed_warnings 769 -kotlin-responseBased-deprecated_merged_field 768 -java-operationBased-path_vs_flat_accessors 761 -kotlin-responseBased-root_query_inline_fragment 750 -kotlin-responseBased-simple_union 749 -kotlin-operationBased-target_name 747 -java-operationBased-reserved_keywords 740 -java-operationBased-typename_always_first 738 -kotlin-operationBased-inline_fragments_with_friends 729 -kotlin-responseBased-fragments_same_type_condition 725 -java-operationBased-interface_on_interface 713 -kotlin-operationBased-simple_fragment_with_inline_fragments 707 -java-operationBased-root_query_fragment 698 -kotlin-operationBased-fragment_spread_with_nested_fields 695 -java-operationBased-input_object_variable_and_argument 694 -java-operationBased-input_object_variable_and_argument_with_generated_methods 694 -java-operationBased-monomorphic 670 -kotlin-operationBased-operationbased2_ex8 669 -java-operationBased-interface_always_nested 668 -kotlin-operationBased-fragments_same_type_condition 654 -kotlin-responseBased-input_object_variable_and_argument_with_generated_methods 650 -java-operationBased-capitalized_fields 649 -java-operationBased-recursive_selection 646 -kotlin-responseBased-union_fragment 646 -kotlin-responseBased-fragment_with_multiple_fieldsets 645 -kotlin-operationBased-simple_union 645 -kotlin-responseBased-test_inline 643 -kotlin-responseBased-named_fragment_without_implementation 642 -java-operationBased-hero_with_review 637 -kotlin-responseBased-hero_details 636 -java-operationBased-deprecation 633 -kotlin-operationBased-decapitalized_fields 631 -kotlin-operationBased-deprecated_merged_field 628 -kotlin-responseBased-inline_fragment_merge_fields 624 -kotlin-operationBased-not_all_combinations_are_needed 621 -java-operationBased-field_with_include_directive 618 -kotlin-operationBased-union_fragment 618 -java-operationBased-hero_name_query_long_name 617 -kotlin-operationBased-inline_fragment_inside_inline_fragment 617 -kotlin-operationBased-inline_fragment_with_include_directive 616 -java-operationBased-custom_scalar_type 615 -java-operationBased-variable_default_value 614 -kotlin-responseBased-inline_fragment_inside_inline_fragment 611 -java-operationBased-hero_name 610 -kotlin-operationBased-simple_inline_fragment 610 -kotlin-operationBased-fieldset_with_multiple_super 608 -kotlin-operationBased-named_fragment_without_implementation 607 -kotlin-responseBased-java_android_annotations 604 -kotlin-responseBased-java_apollo_optionals 604 -kotlin-responseBased-java_guava_optionals 604 -kotlin-responseBased-java_java_optionals 604 -kotlin-responseBased-java_jetbrains_annotations 604 -kotlin-responseBased-java_jsr305_annotations 604 -kotlin-responseBased-simple_inline_fragment 603 -kotlin-responseBased-operationbased2_ex7 602 -kotlin-responseBased-not_all_combinations_are_needed 596 -kotlin-responseBased-fieldset_with_multiple_super 595 -kotlin-responseBased-decapitalized_fields 594 -kotlin-responseBased-introspection_query 591 -java-operationBased-optional 591 -java-operationBased-java8annotation 590 -java-operationBased-enum_field 580 -java-operationBased-inline_fragment_for_non_optional_field 578 -kotlin-responseBased-reserved_keywords 574 -java-operationBased-inline_fragment_type_coercion 572 -kotlin-responseBased-java_primitive_types 568 -kotlin-operationBased-test_inline 567 -java-operationBased-two_heroes_unique 567 -kotlin-responseBased-input_object_variable_and_argument 561 -java-operationBased-list_field_clash 559 -java-operationBased-inline_fragment_simple 557 -kotlin-operationBased-reserved_keywords 547 -kotlin-responseBased-path_vs_flat_accessors 546 -kotlin-responseBased-hero_details_semantic_naming 539 -kotlin-responseBased-root_query_fragment 533 -kotlin-responseBased-typename_always_first 533 -kotlin-operationBased-fragment_with_multiple_fieldsets 529 -kotlin-responseBased-hero_with_review 523 -kotlin-operationBased-typename_always_first 522 -kotlin-responseBased-interface_on_interface 521 -kotlin-operationBased-operationbased2_ex7 521 -java-operationBased-starships 517 -kotlin-responseBased-suppressed_warnings 516 -kotlin-operationBased-path_vs_flat_accessors 515 -kotlin-responseBased-input_object_oneof 511 -java-operationBased-antlr_tokens 505 -kotlin-responseBased-hero_name 503 -java-operationBased-subscriptions 501 -kotlin-operationBased-interface_on_interface 495 -kotlin-responseBased-hero_name_query_long_name 493 -kotlin-responseBased-interface_always_nested 490 -java-operationBased-arguments_hardcoded 484 -kotlin-responseBased-custom_scalar_type 482 -kotlin-operationBased-root_query_fragment 482 -kotlin-responseBased-variable_default_value 467 -kotlin-operationBased-interface_always_nested 462 -java-operationBased-merged_include 462 -java-operationBased-operation_id_generator 462 -kotlin-responseBased-deprecation 459 -kotlin-operationBased-monomorphic 459 -kotlin-responseBased-monomorphic 459 -kotlin-responseBased-inline_fragment_for_non_optional_field 458 -kotlin-responseBased-enum_field 457 -java-operationBased-enums_as_sealed 452 -kotlin-responseBased-optional 451 -java-operationBased-case_sensitive_enum 449 -kotlin-operationBased-hero_name 446 -kotlin-responseBased-field_with_include_directive 444 -java-operationBased-nonnull 443 -kotlin-operationBased-capitalized_fields 440 -kotlin-responseBased-inline_fragment_type_coercion 436 -java-operationBased-companion 434 -java-operationBased-object 429 -kotlin-responseBased-inline_fragment_simple 427 -kotlin-responseBased-recursive_selection 427 -kotlin-operationBased-inline_fragment_for_non_optional_field 415 -kotlin-responseBased-list_field_clash 404 -kotlin-responseBased-capitalized_fields 402 -kotlin-responseBased-two_heroes_unique 402 -kotlin-operationBased-inline_fragment_type_coercion 401 -kotlin-operationBased-inline_fragment_simple 400 -kotlin-responseBased-starships 382 -kotlin-responseBased-java8annotation 381 -kotlin-responseBased-antlr_tokens 379 -kotlin-responseBased-arguments_hardcoded 370 -kotlin-responseBased-subscriptions 369 -kotlin-responseBased-enums_as_sealed 351 -kotlin-responseBased-operation_id_generator 337 -kotlin-responseBased-merged_include 335 -kotlin-responseBased-case_sensitive_enum 332 -java-operationBased-java_hashcode 330 -kotlin-responseBased-big_query 324 -kotlin-responseBased-nonnull 321 -kotlin-operationBased-companion 309 -kotlin-responseBased-object 307 -kotlin-responseBased-java_hashcode 247 +java-operationBased-fragments_with_defer_and_include_directives 5590 +kotlin-operationBased-fragments_with_defer_and_include_directives 3510 +java-operationBased-data_builders 2961 +kotlin-responseBased-fragment_with_inline_fragment 2410 +java-operationBased-mutation_create_review 2371 +kotlin-responseBased-data_builders 2285 +java-operationBased-fragment_with_inline_fragment 2241 +kotlin-operationBased-data_builders 1934 +java-operationBased-nested_named_fragments 1878 +java-operationBased-fragment_spread_with_include_directive 1642 +java-operationBased-union_inline_fragments 1637 +java-operationBased-unique_type_name 1625 +kotlin-responseBased-nested_named_fragments 1619 +java-operationBased-inline_fragment_intersection 1603 +java-operationBased-input_object_type 1589 +java-operationBased-root_query_fragment_with_nested_fragments 1581 +java-operationBased-mutation_create_review_semantic_naming 1573 +java-operationBased-simple_fragment 1478 +java-operationBased-named_fragment_delegate 1475 +kotlin-responseBased-mutation_create_review 1388 +java-operationBased-named_fragment_with_variables 1367 +kotlin-responseBased-named_fragment_delegate 1361 +kotlin-responseBased-unique_type_name 1343 +java-operationBased-nested_conditional_inline 1298 +java-operationBased-fragment_used_twice 1292 +kotlin-operationBased-fragment_with_inline_fragment 1285 +java-operationBased-multiple_fragments 1280 +kotlin-responseBased-root_query_fragment_with_nested_fragments 1263 +java-operationBased-nested_field_with_multiple_fieldsets 1259 +kotlin-operationBased-nested_named_fragments 1245 +kotlin-responseBased-input_object_type 1240 +java-operationBased-two_heroes_with_friends 1216 +java-operationBased-inline_fragment_merge_fields 1214 +kotlin-responseBased-inline_fragment_intersection 1211 +java-operationBased-named_fragment_inside_inline_fragment 1175 +kotlin-responseBased-simple_fragment 1172 +java-operationBased-fragments_with_type_condition 1169 +kotlin-responseBased-fragment_used_twice 1148 +java-operationBased-target_name 1131 +kotlin-operationBased-inline_fragment_intersection 1120 +kotlin-operationBased-union_inline_fragments 1117 +kotlin-responseBased-union_inline_fragments 1117 +kotlin-operationBased-fragment_spread_with_include_directive 1099 +kotlin-responseBased-fragments_with_type_condition 1099 +java-operationBased-root_query_inline_fragment 1099 +java-operationBased-java_jetbrains_annotations 1098 +kotlin-operationBased-unique_type_name 1098 +java-operationBased-java_android_annotations 1095 +java-operationBased-java_jsr305_annotations 1095 +java-operationBased-java_guava_optionals 1079 +java-operationBased-java_java_optionals 1079 +java-operationBased-java_apollo_optionals 1078 +kotlin-responseBased-multiple_fragments 1060 +java-operationBased-simple_fragment_with_inline_fragments 1056 +kotlin-responseBased-simple_fragment_with_inline_fragments 1049 +java-operationBased-inline_fragments_with_friends 1041 +kotlin-operationBased-root_query_fragment_with_nested_fragments 1041 +java-operationBased-fragment_spread_with_nested_fields 1040 +kotlin-responseBased-nested_conditional_inline 1033 +java-operationBased-operationbased2_ex8 1030 +kotlin-responseBased-named_fragment_with_variables 1026 +java-operationBased-java_primitive_types 1023 +kotlin-operationBased-simple_fragment 1020 +kotlin-operationBased-named_fragment_delegate 1003 +java-operationBased-decapitalized_fields 981 +java-operationBased-fragments_same_type_condition 962 +java-operationBased-simple_union 961 +kotlin-responseBased-operationbased2_ex8 949 +java-operationBased-deprecated_merged_field 936 +java-operationBased-not_all_combinations_are_needed 926 +java-operationBased-hero_details 924 +java-operationBased-input_object_oneof 918 +java-operationBased-simple_inline_fragment 906 +java-operationBased-fieldset_with_multiple_super 905 +java-operationBased-inline_fragment_with_include_directive 900 +kotlin-operationBased-nested_conditional_inline 899 +java-operationBased-introspection_query 894 +kotlin-operationBased-fragment_used_twice 884 +kotlin-responseBased-mutation_create_review_semantic_naming 880 +kotlin-operationBased-named_fragment_with_variables 877 +kotlin-responseBased-fragment_spread_with_nested_fields 871 +java-operationBased-union_fragment 871 +java-operationBased-test_inline 869 +java-operationBased-inline_fragment_inside_inline_fragment 858 +kotlin-operationBased-multiple_fragments 836 +kotlin-responseBased-nested_field_with_multiple_fieldsets 832 +kotlin-operationBased-fragments_with_type_condition 830 +java-operationBased-named_fragment_without_implementation 826 +kotlin-operationBased-nested_field_with_multiple_fieldsets 802 +kotlin-operationBased-named_fragment_inside_inline_fragment 797 +kotlin-operationBased-inline_fragment_merge_fields 796 +kotlin-responseBased-two_heroes_with_friends 795 +java-operationBased-fragment_with_multiple_fieldsets 794 +java-operationBased-hero_details_semantic_naming 788 +java-operationBased-operationbased2_ex7 786 +kotlin-responseBased-inline_fragments_with_friends 782 +kotlin-responseBased-named_fragment_inside_inline_fragment 778 +kotlin-responseBased-target_name 777 +kotlin-operationBased-root_query_inline_fragment 776 +java-operationBased-suppressed_warnings 774 +kotlin-responseBased-deprecated_merged_field 772 +java-operationBased-path_vs_flat_accessors 766 +kotlin-responseBased-simple_union 755 +kotlin-responseBased-root_query_inline_fragment 752 +kotlin-operationBased-target_name 749 +java-operationBased-reserved_keywords 745 +java-operationBased-typename_always_first 743 +kotlin-responseBased-fragments_same_type_condition 731 +kotlin-operationBased-inline_fragments_with_friends 731 +java-operationBased-interface_on_interface 718 +kotlin-operationBased-simple_fragment_with_inline_fragments 711 +java-operationBased-root_query_fragment 708 +kotlin-operationBased-fragment_spread_with_nested_fields 699 +java-operationBased-input_object_variable_and_argument 699 +java-operationBased-input_object_variable_and_argument_with_generated_methods 699 +java-operationBased-monomorphic 675 +java-operationBased-interface_always_nested 673 +kotlin-operationBased-operationbased2_ex8 673 +kotlin-operationBased-fragments_same_type_condition 660 +java-operationBased-capitalized_fields 654 +kotlin-responseBased-input_object_variable_and_argument_with_generated_methods 652 +java-operationBased-recursive_selection 651 +kotlin-operationBased-simple_union 651 +kotlin-responseBased-union_fragment 650 +kotlin-responseBased-fragment_with_multiple_fieldsets 649 +kotlin-responseBased-test_inline 645 +kotlin-responseBased-named_fragment_without_implementation 644 +java-operationBased-hero_with_review 642 +java-operationBased-deprecation 638 +kotlin-responseBased-hero_details 638 +kotlin-operationBased-decapitalized_fields 635 +kotlin-operationBased-deprecated_merged_field 632 +kotlin-responseBased-inline_fragment_merge_fields 626 +kotlin-operationBased-not_all_combinations_are_needed 625 +java-operationBased-field_with_include_directive 623 +java-operationBased-hero_name_query_long_name 622 +kotlin-operationBased-union_fragment 622 +java-operationBased-custom_scalar_type 620 +kotlin-operationBased-inline_fragment_inside_inline_fragment 619 +java-operationBased-variable_default_value 619 +kotlin-operationBased-inline_fragment_with_include_directive 618 +java-operationBased-hero_name 615 +kotlin-responseBased-inline_fragment_inside_inline_fragment 613 +kotlin-operationBased-simple_inline_fragment 612 +kotlin-operationBased-fieldset_with_multiple_super 610 +kotlin-operationBased-named_fragment_without_implementation 609 +kotlin-responseBased-java_android_annotations 606 +kotlin-responseBased-java_apollo_optionals 606 +kotlin-responseBased-java_guava_optionals 606 +kotlin-responseBased-java_java_optionals 606 +kotlin-responseBased-java_jetbrains_annotations 606 +kotlin-responseBased-java_jsr305_annotations 606 +kotlin-responseBased-simple_inline_fragment 605 +kotlin-responseBased-operationbased2_ex7 604 +kotlin-responseBased-not_all_combinations_are_needed 600 +kotlin-responseBased-decapitalized_fields 598 +kotlin-responseBased-fieldset_with_multiple_super 597 +java-operationBased-optional 596 +java-operationBased-java8annotation 595 +kotlin-responseBased-introspection_query 593 +java-operationBased-enum_field 585 +java-operationBased-inline_fragment_for_non_optional_field 583 +java-operationBased-inline_fragment_type_coercion 577 +kotlin-responseBased-reserved_keywords 576 +java-operationBased-two_heroes_unique 572 +kotlin-responseBased-java_primitive_types 570 +kotlin-operationBased-test_inline 569 +java-operationBased-list_field_clash 564 +kotlin-responseBased-input_object_variable_and_argument 563 +java-operationBased-inline_fragment_simple 562 +kotlin-operationBased-reserved_keywords 549 +kotlin-responseBased-path_vs_flat_accessors 548 +kotlin-responseBased-hero_details_semantic_naming 541 +kotlin-responseBased-root_query_fragment 537 +kotlin-responseBased-typename_always_first 535 +kotlin-operationBased-fragment_with_multiple_fieldsets 533 +kotlin-responseBased-hero_with_review 525 +kotlin-operationBased-typename_always_first 524 +kotlin-responseBased-interface_on_interface 523 +kotlin-operationBased-operationbased2_ex7 523 +java-operationBased-starships 522 +kotlin-responseBased-suppressed_warnings 518 +kotlin-operationBased-path_vs_flat_accessors 517 +kotlin-responseBased-input_object_oneof 513 +java-operationBased-antlr_tokens 510 +java-operationBased-subscriptions 506 +kotlin-responseBased-hero_name 505 +kotlin-operationBased-interface_on_interface 497 +kotlin-responseBased-hero_name_query_long_name 495 +kotlin-responseBased-interface_always_nested 492 +java-operationBased-arguments_hardcoded 489 +kotlin-operationBased-root_query_fragment 486 +kotlin-responseBased-custom_scalar_type 484 +kotlin-responseBased-variable_default_value 469 +java-operationBased-merged_include 467 +java-operationBased-operation_id_generator 467 +kotlin-operationBased-interface_always_nested 464 +kotlin-responseBased-deprecation 461 +kotlin-operationBased-monomorphic 461 +kotlin-responseBased-monomorphic 461 +kotlin-responseBased-inline_fragment_for_non_optional_field 460 +kotlin-responseBased-enum_field 459 +java-operationBased-enums_as_sealed 457 +java-operationBased-case_sensitive_enum 454 +kotlin-responseBased-optional 453 +kotlin-operationBased-hero_name 448 +java-operationBased-nonnull 448 +kotlin-responseBased-field_with_include_directive 446 +kotlin-operationBased-capitalized_fields 442 +java-operationBased-companion 439 +kotlin-responseBased-inline_fragment_type_coercion 438 +java-operationBased-object 434 +kotlin-responseBased-inline_fragment_simple 429 +kotlin-responseBased-recursive_selection 429 +kotlin-operationBased-inline_fragment_for_non_optional_field 417 +kotlin-responseBased-list_field_clash 406 +kotlin-responseBased-capitalized_fields 404 +kotlin-responseBased-two_heroes_unique 404 +kotlin-operationBased-inline_fragment_type_coercion 403 +kotlin-operationBased-inline_fragment_simple 402 +kotlin-responseBased-starships 384 +kotlin-responseBased-java8annotation 383 +kotlin-responseBased-antlr_tokens 381 +kotlin-responseBased-arguments_hardcoded 372 +kotlin-responseBased-subscriptions 371 +kotlin-responseBased-enums_as_sealed 353 +kotlin-responseBased-operation_id_generator 339 +kotlin-responseBased-merged_include 337 +java-operationBased-java_hashcode 335 +kotlin-responseBased-case_sensitive_enum 334 +kotlin-responseBased-big_query 326 +kotlin-responseBased-nonnull 323 +kotlin-operationBased-companion 311 +kotlin-responseBased-object 309 +kotlin-responseBased-java_hashcode 249 kotlin-responseBased-__schema 128 java-operationBased-__schema 103 kotlin-responseBased-empty 91 diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/merged_include/java/operationBased/merged_include/TestQuery.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/merged_include/java/operationBased/merged_include/TestQuery.java.expected index 87dd1fc54ed..6c275690ebb 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/merged_include/java/operationBased/merged_include/TestQuery.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/merged_include/java/operationBased/merged_include/TestQuery.java.expected @@ -118,6 +118,11 @@ public class TestQuery implements Query { .build(); } + @Override + public boolean getIgnoreErrors() { + return false; + } + public static final class Builder { Builder() { } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/merged_include/kotlin/responseBased/merged_include/TestQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/merged_include/kotlin/responseBased/merged_include/TestQuery.kt.expected index 43237be8b11..4bde69cd566 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/merged_include/kotlin/responseBased/merged_include/TestQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/merged_include/kotlin/responseBased/merged_include/TestQuery.kt.expected @@ -21,6 +21,8 @@ import kotlin.String import com.example.merged_include.type.Query as CompiledQuery public class TestQuery() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/monomorphic/java/operationBased/monomorphic/TestQuery.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/monomorphic/java/operationBased/monomorphic/TestQuery.java.expected index 34d8d62ebb9..ad1c67e1c25 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/monomorphic/java/operationBased/monomorphic/TestQuery.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/monomorphic/java/operationBased/monomorphic/TestQuery.java.expected @@ -121,6 +121,11 @@ public class TestQuery implements Query { .build(); } + @Override + public boolean getIgnoreErrors() { + return false; + } + public static final class Builder { Builder() { } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/monomorphic/kotlin/operationBased/monomorphic/TestQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/monomorphic/kotlin/operationBased/monomorphic/TestQuery.kt.expected index b4f5d22ae9c..dc36dd306dd 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/monomorphic/kotlin/operationBased/monomorphic/TestQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/monomorphic/kotlin/operationBased/monomorphic/TestQuery.kt.expected @@ -21,6 +21,8 @@ import kotlin.String import com.example.monomorphic.type.Query as CompiledQuery public class TestQuery() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/monomorphic/kotlin/responseBased/monomorphic/TestQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/monomorphic/kotlin/responseBased/monomorphic/TestQuery.kt.expected index e4f2644ba14..a6b877eb76f 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/monomorphic/kotlin/responseBased/monomorphic/TestQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/monomorphic/kotlin/responseBased/monomorphic/TestQuery.kt.expected @@ -22,6 +22,8 @@ import kotlin.Suppress import com.example.monomorphic.type.Query as CompiledQuery public class TestQuery() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/multiple_fragments/java/operationBased/multiple_fragments/TestQuery.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/multiple_fragments/java/operationBased/multiple_fragments/TestQuery.java.expected index f4ae7936b00..7754ad0134c 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/multiple_fragments/java/operationBased/multiple_fragments/TestQuery.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/multiple_fragments/java/operationBased/multiple_fragments/TestQuery.java.expected @@ -133,6 +133,11 @@ public class TestQuery implements Query { .build(); } + @Override + public boolean getIgnoreErrors() { + return false; + } + public static final class Builder { Builder() { } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/multiple_fragments/java/operationBased/multiple_fragments/fragment/AFragmentImpl.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/multiple_fragments/java/operationBased/multiple_fragments/fragment/AFragmentImpl.java.expected index f2c422f3ad0..a6e83ee060f 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/multiple_fragments/java/operationBased/multiple_fragments/fragment/AFragmentImpl.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/multiple_fragments/java/operationBased/multiple_fragments/fragment/AFragmentImpl.java.expected @@ -79,4 +79,9 @@ public class AFragmentImpl implements Fragment { .selections(aFragmentSelections.__root) .build(); } + + @Override + public boolean getIgnoreErrors() { + return false; + } } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/multiple_fragments/java/operationBased/multiple_fragments/fragment/Fragment1Impl.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/multiple_fragments/java/operationBased/multiple_fragments/fragment/Fragment1Impl.java.expected index 9dbbb0d48fd..ab5fbf4df68 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/multiple_fragments/java/operationBased/multiple_fragments/fragment/Fragment1Impl.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/multiple_fragments/java/operationBased/multiple_fragments/fragment/Fragment1Impl.java.expected @@ -79,4 +79,9 @@ public class Fragment1Impl implements Fragment { .selections(fragment1Selections.__root) .build(); } + + @Override + public boolean getIgnoreErrors() { + return false; + } } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/multiple_fragments/java/operationBased/multiple_fragments/fragment/Fragment2Impl.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/multiple_fragments/java/operationBased/multiple_fragments/fragment/Fragment2Impl.java.expected index a8409646221..8c60ac133e3 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/multiple_fragments/java/operationBased/multiple_fragments/fragment/Fragment2Impl.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/multiple_fragments/java/operationBased/multiple_fragments/fragment/Fragment2Impl.java.expected @@ -79,4 +79,9 @@ public class Fragment2Impl implements Fragment { .selections(fragment2Selections.__root) .build(); } + + @Override + public boolean getIgnoreErrors() { + return false; + } } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/multiple_fragments/kotlin/operationBased/multiple_fragments/TestQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/multiple_fragments/kotlin/operationBased/multiple_fragments/TestQuery.kt.expected index e4ded39396e..bb12a08476c 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/multiple_fragments/kotlin/operationBased/multiple_fragments/TestQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/multiple_fragments/kotlin/operationBased/multiple_fragments/TestQuery.kt.expected @@ -22,6 +22,8 @@ import kotlin.String import com.example.multiple_fragments.type.Query as CompiledQuery public class TestQuery() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/multiple_fragments/kotlin/operationBased/multiple_fragments/fragment/AFragmentImpl.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/multiple_fragments/kotlin/operationBased/multiple_fragments/fragment/AFragmentImpl.kt.expected index c897fcc7a59..44d2695a64d 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/multiple_fragments/kotlin/operationBased/multiple_fragments/fragment/AFragmentImpl.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/multiple_fragments/kotlin/operationBased/multiple_fragments/fragment/AFragmentImpl.kt.expected @@ -18,6 +18,8 @@ import kotlin.Boolean import kotlin.Int public class AFragmentImpl() : Fragment { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/multiple_fragments/kotlin/operationBased/multiple_fragments/fragment/Fragment1Impl.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/multiple_fragments/kotlin/operationBased/multiple_fragments/fragment/Fragment1Impl.kt.expected index 7f9d40c28c2..f4f806cf742 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/multiple_fragments/kotlin/operationBased/multiple_fragments/fragment/Fragment1Impl.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/multiple_fragments/kotlin/operationBased/multiple_fragments/fragment/Fragment1Impl.kt.expected @@ -18,6 +18,8 @@ import kotlin.Boolean import kotlin.Int public class Fragment1Impl() : Fragment { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/multiple_fragments/kotlin/operationBased/multiple_fragments/fragment/Fragment2Impl.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/multiple_fragments/kotlin/operationBased/multiple_fragments/fragment/Fragment2Impl.kt.expected index 4aa0d66392b..2d028d479e4 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/multiple_fragments/kotlin/operationBased/multiple_fragments/fragment/Fragment2Impl.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/multiple_fragments/kotlin/operationBased/multiple_fragments/fragment/Fragment2Impl.kt.expected @@ -18,6 +18,8 @@ import kotlin.Boolean import kotlin.Int public class Fragment2Impl() : Fragment { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/multiple_fragments/kotlin/responseBased/multiple_fragments/TestQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/multiple_fragments/kotlin/responseBased/multiple_fragments/TestQuery.kt.expected index 8a17de86515..a1ec0ba91b9 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/multiple_fragments/kotlin/responseBased/multiple_fragments/TestQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/multiple_fragments/kotlin/responseBased/multiple_fragments/TestQuery.kt.expected @@ -25,6 +25,8 @@ import kotlin.Suppress import com.example.multiple_fragments.type.Query as CompiledQuery public class TestQuery() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/multiple_fragments/kotlin/responseBased/multiple_fragments/fragment/AFragmentImpl.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/multiple_fragments/kotlin/responseBased/multiple_fragments/fragment/AFragmentImpl.kt.expected index 4fc55bea62e..41265a81237 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/multiple_fragments/kotlin/responseBased/multiple_fragments/fragment/AFragmentImpl.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/multiple_fragments/kotlin/responseBased/multiple_fragments/fragment/AFragmentImpl.kt.expected @@ -20,6 +20,8 @@ import kotlin.String import kotlin.Suppress public class AFragmentImpl() : Fragment { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/multiple_fragments/kotlin/responseBased/multiple_fragments/fragment/Fragment1Impl.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/multiple_fragments/kotlin/responseBased/multiple_fragments/fragment/Fragment1Impl.kt.expected index 7104c573e8e..1b6bd1bb156 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/multiple_fragments/kotlin/responseBased/multiple_fragments/fragment/Fragment1Impl.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/multiple_fragments/kotlin/responseBased/multiple_fragments/fragment/Fragment1Impl.kt.expected @@ -19,6 +19,8 @@ import kotlin.Int import kotlin.String public class Fragment1Impl() : Fragment { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/multiple_fragments/kotlin/responseBased/multiple_fragments/fragment/Fragment2Impl.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/multiple_fragments/kotlin/responseBased/multiple_fragments/fragment/Fragment2Impl.kt.expected index ce07e88a59b..d2e11d56876 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/multiple_fragments/kotlin/responseBased/multiple_fragments/fragment/Fragment2Impl.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/multiple_fragments/kotlin/responseBased/multiple_fragments/fragment/Fragment2Impl.kt.expected @@ -19,6 +19,8 @@ import kotlin.Int import kotlin.String public class Fragment2Impl() : Fragment { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/mutation_create_review/java/operationBased/mutation_create_review/CreateReviewForEpisode.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/mutation_create_review/java/operationBased/mutation_create_review/CreateReviewForEpisode.java.expected index a10cdccd84c..bf945257a9b 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/mutation_create_review/java/operationBased/mutation_create_review/CreateReviewForEpisode.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/mutation_create_review/java/operationBased/mutation_create_review/CreateReviewForEpisode.java.expected @@ -161,6 +161,11 @@ public class CreateReviewForEpisode implements Mutation { + override val ignoreErrors: Boolean = false + override fun id(): String = OPERATION_ID override fun document(): String = OPERATION_DOCUMENT diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/mutation_create_review_semantic_naming/java/operationBased/mutation_create_review_semantic_naming/CreateReviewForEpisodeMutation.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/mutation_create_review_semantic_naming/java/operationBased/mutation_create_review_semantic_naming/CreateReviewForEpisodeMutation.java.expected index 60c589f75f8..1c93a49cde1 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/mutation_create_review_semantic_naming/java/operationBased/mutation_create_review_semantic_naming/CreateReviewForEpisodeMutation.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/mutation_create_review_semantic_naming/java/operationBased/mutation_create_review_semantic_naming/CreateReviewForEpisodeMutation.java.expected @@ -133,6 +133,11 @@ public class CreateReviewForEpisodeMutation implements Mutation { + override val ignoreErrors: Boolean = false + override fun id(): String = OPERATION_ID override fun document(): String = OPERATION_DOCUMENT diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_delegate/java/operationBased/named_fragment_delegate/TestQuery.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_delegate/java/operationBased/named_fragment_delegate/TestQuery.java.expected index be4e35b7ca2..76a5e2c5c66 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_delegate/java/operationBased/named_fragment_delegate/TestQuery.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_delegate/java/operationBased/named_fragment_delegate/TestQuery.java.expected @@ -139,6 +139,11 @@ public class TestQuery implements Query { .build(); } + @Override + public boolean getIgnoreErrors() { + return false; + } + public static final class Builder { Builder() { } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_delegate/java/operationBased/named_fragment_delegate/fragment/DroidDetailsImpl.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_delegate/java/operationBased/named_fragment_delegate/fragment/DroidDetailsImpl.java.expected index ef19cbbdfdc..fc2b97f69f4 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_delegate/java/operationBased/named_fragment_delegate/fragment/DroidDetailsImpl.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_delegate/java/operationBased/named_fragment_delegate/fragment/DroidDetailsImpl.java.expected @@ -79,4 +79,9 @@ public class DroidDetailsImpl implements Fragment { .selections(DroidDetailsSelections.__root) .build(); } + + @Override + public boolean getIgnoreErrors() { + return false; + } } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_delegate/java/operationBased/named_fragment_delegate/fragment/HumanDetailsImpl.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_delegate/java/operationBased/named_fragment_delegate/fragment/HumanDetailsImpl.java.expected index 0c77d647034..637d91bfc3b 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_delegate/java/operationBased/named_fragment_delegate/fragment/HumanDetailsImpl.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_delegate/java/operationBased/named_fragment_delegate/fragment/HumanDetailsImpl.java.expected @@ -79,4 +79,9 @@ public class HumanDetailsImpl implements Fragment { .selections(HumanDetailsSelections.__root) .build(); } + + @Override + public boolean getIgnoreErrors() { + return false; + } } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_delegate/kotlin/operationBased/named_fragment_delegate/TestQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_delegate/kotlin/operationBased/named_fragment_delegate/TestQuery.kt.expected index 83a462e4627..f716942da8d 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_delegate/kotlin/operationBased/named_fragment_delegate/TestQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_delegate/kotlin/operationBased/named_fragment_delegate/TestQuery.kt.expected @@ -23,6 +23,8 @@ import kotlin.String import com.example.named_fragment_delegate.type.Query as CompiledQuery public class TestQuery() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_delegate/kotlin/operationBased/named_fragment_delegate/fragment/DroidDetailsImpl.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_delegate/kotlin/operationBased/named_fragment_delegate/fragment/DroidDetailsImpl.kt.expected index 5f1da73cd91..02cabc0cc70 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_delegate/kotlin/operationBased/named_fragment_delegate/fragment/DroidDetailsImpl.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_delegate/kotlin/operationBased/named_fragment_delegate/fragment/DroidDetailsImpl.kt.expected @@ -18,6 +18,8 @@ import kotlin.Boolean import kotlin.Int public class DroidDetailsImpl() : Fragment { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_delegate/kotlin/operationBased/named_fragment_delegate/fragment/HumanDetailsImpl.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_delegate/kotlin/operationBased/named_fragment_delegate/fragment/HumanDetailsImpl.kt.expected index b854e6c098d..447b682ff18 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_delegate/kotlin/operationBased/named_fragment_delegate/fragment/HumanDetailsImpl.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_delegate/kotlin/operationBased/named_fragment_delegate/fragment/HumanDetailsImpl.kt.expected @@ -18,6 +18,8 @@ import kotlin.Boolean import kotlin.Int public class HumanDetailsImpl() : Fragment { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_delegate/kotlin/responseBased/named_fragment_delegate/TestQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_delegate/kotlin/responseBased/named_fragment_delegate/TestQuery.kt.expected index 0fbbf71fc2d..704c7c4f103 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_delegate/kotlin/responseBased/named_fragment_delegate/TestQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_delegate/kotlin/responseBased/named_fragment_delegate/TestQuery.kt.expected @@ -25,6 +25,8 @@ import kotlin.collections.List import com.example.named_fragment_delegate.type.Query as CompiledQuery public class TestQuery() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_delegate/kotlin/responseBased/named_fragment_delegate/fragment/DroidDetailsImpl.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_delegate/kotlin/responseBased/named_fragment_delegate/fragment/DroidDetailsImpl.kt.expected index 26377e4af27..5dfed768eb7 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_delegate/kotlin/responseBased/named_fragment_delegate/fragment/DroidDetailsImpl.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_delegate/kotlin/responseBased/named_fragment_delegate/fragment/DroidDetailsImpl.kt.expected @@ -20,6 +20,8 @@ import kotlin.String import kotlin.collections.List public class DroidDetailsImpl() : Fragment { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_delegate/kotlin/responseBased/named_fragment_delegate/fragment/HumanDetailsImpl.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_delegate/kotlin/responseBased/named_fragment_delegate/fragment/HumanDetailsImpl.kt.expected index 37c6e7cb1f0..64952ab4447 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_delegate/kotlin/responseBased/named_fragment_delegate/fragment/HumanDetailsImpl.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_delegate/kotlin/responseBased/named_fragment_delegate/fragment/HumanDetailsImpl.kt.expected @@ -20,6 +20,8 @@ import kotlin.String import kotlin.collections.List public class HumanDetailsImpl() : Fragment { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_inside_inline_fragment/java/operationBased/named_fragment_inside_inline_fragment/GetHero.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_inside_inline_fragment/java/operationBased/named_fragment_inside_inline_fragment/GetHero.java.expected index 01e19927d1a..4d9c190566f 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_inside_inline_fragment/java/operationBased/named_fragment_inside_inline_fragment/GetHero.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_inside_inline_fragment/java/operationBased/named_fragment_inside_inline_fragment/GetHero.java.expected @@ -130,6 +130,11 @@ public class GetHero implements Query { .build(); } + @Override + public boolean getIgnoreErrors() { + return false; + } + public static final class Builder { Builder() { } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_inside_inline_fragment/java/operationBased/named_fragment_inside_inline_fragment/fragment/CharacterAppearsInImpl.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_inside_inline_fragment/java/operationBased/named_fragment_inside_inline_fragment/fragment/CharacterAppearsInImpl.java.expected index 23c0826093c..89dae25cc1a 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_inside_inline_fragment/java/operationBased/named_fragment_inside_inline_fragment/fragment/CharacterAppearsInImpl.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_inside_inline_fragment/java/operationBased/named_fragment_inside_inline_fragment/fragment/CharacterAppearsInImpl.java.expected @@ -79,4 +79,9 @@ public class CharacterAppearsInImpl implements Fragment { .selections(characterAppearsInSelections.__root) .build(); } + + @Override + public boolean getIgnoreErrors() { + return false; + } } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_inside_inline_fragment/java/operationBased/named_fragment_inside_inline_fragment/fragment/CharacterNameImpl.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_inside_inline_fragment/java/operationBased/named_fragment_inside_inline_fragment/fragment/CharacterNameImpl.java.expected index 3af9059856a..db756f4de73 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_inside_inline_fragment/java/operationBased/named_fragment_inside_inline_fragment/fragment/CharacterNameImpl.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_inside_inline_fragment/java/operationBased/named_fragment_inside_inline_fragment/fragment/CharacterNameImpl.java.expected @@ -79,4 +79,9 @@ public class CharacterNameImpl implements Fragment { .selections(characterNameSelections.__root) .build(); } + + @Override + public boolean getIgnoreErrors() { + return false; + } } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_inside_inline_fragment/kotlin/operationBased/named_fragment_inside_inline_fragment/GetHero.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_inside_inline_fragment/kotlin/operationBased/named_fragment_inside_inline_fragment/GetHero.kt.expected index 6f66cd0b26d..b9e59d45746 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_inside_inline_fragment/kotlin/operationBased/named_fragment_inside_inline_fragment/GetHero.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_inside_inline_fragment/kotlin/operationBased/named_fragment_inside_inline_fragment/GetHero.kt.expected @@ -23,6 +23,8 @@ import kotlin.String import com.example.named_fragment_inside_inline_fragment.type.Query as CompiledQuery public class GetHero() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_inside_inline_fragment/kotlin/operationBased/named_fragment_inside_inline_fragment/fragment/CharacterAppearsInImpl.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_inside_inline_fragment/kotlin/operationBased/named_fragment_inside_inline_fragment/fragment/CharacterAppearsInImpl.kt.expected index 315abd234bf..af21c1ee2cc 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_inside_inline_fragment/kotlin/operationBased/named_fragment_inside_inline_fragment/fragment/CharacterAppearsInImpl.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_inside_inline_fragment/kotlin/operationBased/named_fragment_inside_inline_fragment/fragment/CharacterAppearsInImpl.kt.expected @@ -18,6 +18,8 @@ import kotlin.Boolean import kotlin.Int public class CharacterAppearsInImpl() : Fragment { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_inside_inline_fragment/kotlin/operationBased/named_fragment_inside_inline_fragment/fragment/CharacterNameImpl.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_inside_inline_fragment/kotlin/operationBased/named_fragment_inside_inline_fragment/fragment/CharacterNameImpl.kt.expected index 2381e3af421..5ca006186d3 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_inside_inline_fragment/kotlin/operationBased/named_fragment_inside_inline_fragment/fragment/CharacterNameImpl.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_inside_inline_fragment/kotlin/operationBased/named_fragment_inside_inline_fragment/fragment/CharacterNameImpl.kt.expected @@ -18,6 +18,8 @@ import kotlin.Boolean import kotlin.Int public class CharacterNameImpl() : Fragment { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_inside_inline_fragment/kotlin/responseBased/named_fragment_inside_inline_fragment/GetHero.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_inside_inline_fragment/kotlin/responseBased/named_fragment_inside_inline_fragment/GetHero.kt.expected index 969645ea9f8..a562449f662 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_inside_inline_fragment/kotlin/responseBased/named_fragment_inside_inline_fragment/GetHero.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_inside_inline_fragment/kotlin/responseBased/named_fragment_inside_inline_fragment/GetHero.kt.expected @@ -26,6 +26,8 @@ import kotlin.collections.List import com.example.named_fragment_inside_inline_fragment.type.Query as CompiledQuery public class GetHero() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_inside_inline_fragment/kotlin/responseBased/named_fragment_inside_inline_fragment/fragment/CharacterAppearsInImpl.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_inside_inline_fragment/kotlin/responseBased/named_fragment_inside_inline_fragment/fragment/CharacterAppearsInImpl.kt.expected index 57f263a5200..53879ba3b76 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_inside_inline_fragment/kotlin/responseBased/named_fragment_inside_inline_fragment/fragment/CharacterAppearsInImpl.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_inside_inline_fragment/kotlin/responseBased/named_fragment_inside_inline_fragment/fragment/CharacterAppearsInImpl.kt.expected @@ -20,6 +20,8 @@ import kotlin.Int import kotlin.collections.List public class CharacterAppearsInImpl() : Fragment { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_inside_inline_fragment/kotlin/responseBased/named_fragment_inside_inline_fragment/fragment/CharacterNameImpl.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_inside_inline_fragment/kotlin/responseBased/named_fragment_inside_inline_fragment/fragment/CharacterNameImpl.kt.expected index 8e8eb81ed18..3c3a50fc2f3 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_inside_inline_fragment/kotlin/responseBased/named_fragment_inside_inline_fragment/fragment/CharacterNameImpl.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_inside_inline_fragment/kotlin/responseBased/named_fragment_inside_inline_fragment/fragment/CharacterNameImpl.kt.expected @@ -19,6 +19,8 @@ import kotlin.Int import kotlin.String public class CharacterNameImpl() : Fragment { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_with_variables/java/operationBased/named_fragment_with_variables/GetUser.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_with_variables/java/operationBased/named_fragment_with_variables/GetUser.java.expected index f95d66ff003..204b4135a14 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_with_variables/java/operationBased/named_fragment_with_variables/GetUser.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_with_variables/java/operationBased/named_fragment_with_variables/GetUser.java.expected @@ -154,6 +154,11 @@ public class GetUser implements Query { .build(); } + @Override + public boolean getIgnoreErrors() { + return false; + } + public static final class Builder { private String organizationId; diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_with_variables/java/operationBased/named_fragment_with_variables/fragment/QueryFragmentImpl.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_with_variables/java/operationBased/named_fragment_with_variables/fragment/QueryFragmentImpl.java.expected index 3e86a522e72..0a9e3c2b6bc 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_with_variables/java/operationBased/named_fragment_with_variables/fragment/QueryFragmentImpl.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_with_variables/java/operationBased/named_fragment_with_variables/fragment/QueryFragmentImpl.java.expected @@ -102,4 +102,9 @@ public class QueryFragmentImpl implements Fragment { .selections(QueryFragmentSelections.__root) .build(); } + + @Override + public boolean getIgnoreErrors() { + return false; + } } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_with_variables/java/operationBased/named_fragment_with_variables/fragment/UserFragmentImpl.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_with_variables/java/operationBased/named_fragment_with_variables/fragment/UserFragmentImpl.java.expected index 09476d51993..6df35f2a3fd 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_with_variables/java/operationBased/named_fragment_with_variables/fragment/UserFragmentImpl.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_with_variables/java/operationBased/named_fragment_with_variables/fragment/UserFragmentImpl.java.expected @@ -87,4 +87,9 @@ public class UserFragmentImpl implements Fragment { .selections(UserFragmentSelections.__root) .build(); } + + @Override + public boolean getIgnoreErrors() { + return false; + } } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_with_variables/kotlin/operationBased/named_fragment_with_variables/GetUser.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_with_variables/kotlin/operationBased/named_fragment_with_variables/GetUser.kt.expected index b5ada393088..f9175a2511c 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_with_variables/kotlin/operationBased/named_fragment_with_variables/GetUser.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_with_variables/kotlin/operationBased/named_fragment_with_variables/GetUser.kt.expected @@ -27,6 +27,8 @@ public data class GetUser( public val query: UserQuery, public val size: Int, ) : Query { + override val ignoreErrors: Boolean = false + override fun id(): String = OPERATION_ID override fun document(): String = OPERATION_DOCUMENT diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_with_variables/kotlin/operationBased/named_fragment_with_variables/fragment/QueryFragmentImpl.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_with_variables/kotlin/operationBased/named_fragment_with_variables/fragment/QueryFragmentImpl.kt.expected index cb2b9281533..02024417ca4 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_with_variables/kotlin/operationBased/named_fragment_with_variables/fragment/QueryFragmentImpl.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_with_variables/kotlin/operationBased/named_fragment_with_variables/fragment/QueryFragmentImpl.kt.expected @@ -24,6 +24,8 @@ public data class QueryFragmentImpl( public val query: UserQuery, public val size: Int, ) : Fragment { + override val ignoreErrors: Boolean = false + override fun serializeVariables( writer: JsonWriter, customScalarAdapters: CustomScalarAdapters, diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_with_variables/kotlin/operationBased/named_fragment_with_variables/fragment/UserFragmentImpl.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_with_variables/kotlin/operationBased/named_fragment_with_variables/fragment/UserFragmentImpl.kt.expected index 18e30bb2794..763e00f86e1 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_with_variables/kotlin/operationBased/named_fragment_with_variables/fragment/UserFragmentImpl.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_with_variables/kotlin/operationBased/named_fragment_with_variables/fragment/UserFragmentImpl.kt.expected @@ -20,6 +20,8 @@ import kotlin.Int public data class UserFragmentImpl( public val size: Int, ) : Fragment { + override val ignoreErrors: Boolean = false + override fun serializeVariables( writer: JsonWriter, customScalarAdapters: CustomScalarAdapters, diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_with_variables/kotlin/responseBased/named_fragment_with_variables/GetUser.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_with_variables/kotlin/responseBased/named_fragment_with_variables/GetUser.kt.expected index 4246f39c392..81172446408 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_with_variables/kotlin/responseBased/named_fragment_with_variables/GetUser.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_with_variables/kotlin/responseBased/named_fragment_with_variables/GetUser.kt.expected @@ -30,6 +30,8 @@ public data class GetUser( public val query: UserQuery, public val size: Int, ) : Query { + override val ignoreErrors: Boolean = false + override fun id(): String = OPERATION_ID override fun document(): String = OPERATION_DOCUMENT diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_with_variables/kotlin/responseBased/named_fragment_with_variables/fragment/QueryFragmentImpl.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_with_variables/kotlin/responseBased/named_fragment_with_variables/fragment/QueryFragmentImpl.kt.expected index 563492985e0..411e01955ce 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_with_variables/kotlin/responseBased/named_fragment_with_variables/fragment/QueryFragmentImpl.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_with_variables/kotlin/responseBased/named_fragment_with_variables/fragment/QueryFragmentImpl.kt.expected @@ -26,6 +26,8 @@ public data class QueryFragmentImpl( public val query: UserQuery, public val size: Int, ) : Fragment { + override val ignoreErrors: Boolean = false + override fun serializeVariables( writer: JsonWriter, customScalarAdapters: CustomScalarAdapters, diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_with_variables/kotlin/responseBased/named_fragment_with_variables/fragment/UserFragmentImpl.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_with_variables/kotlin/responseBased/named_fragment_with_variables/fragment/UserFragmentImpl.kt.expected index 4273d9d7d8e..fc0e2a6ada6 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_with_variables/kotlin/responseBased/named_fragment_with_variables/fragment/UserFragmentImpl.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_with_variables/kotlin/responseBased/named_fragment_with_variables/fragment/UserFragmentImpl.kt.expected @@ -21,6 +21,8 @@ import kotlin.String public data class UserFragmentImpl( public val size: Int, ) : Fragment { + override val ignoreErrors: Boolean = false + override fun serializeVariables( writer: JsonWriter, customScalarAdapters: CustomScalarAdapters, diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_without_implementation/java/operationBased/named_fragment_without_implementation/TestQuery.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_without_implementation/java/operationBased/named_fragment_without_implementation/TestQuery.java.expected index 7497a02b54a..0b8e72a9226 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_without_implementation/java/operationBased/named_fragment_without_implementation/TestQuery.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_without_implementation/java/operationBased/named_fragment_without_implementation/TestQuery.java.expected @@ -128,6 +128,11 @@ public class TestQuery implements Query { .build(); } + @Override + public boolean getIgnoreErrors() { + return false; + } + public static final class Builder { Builder() { } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_without_implementation/kotlin/operationBased/named_fragment_without_implementation/TestQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_without_implementation/kotlin/operationBased/named_fragment_without_implementation/TestQuery.kt.expected index 7134b246707..135ded6978c 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_without_implementation/kotlin/operationBased/named_fragment_without_implementation/TestQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_without_implementation/kotlin/operationBased/named_fragment_without_implementation/TestQuery.kt.expected @@ -23,6 +23,8 @@ import kotlin.String import com.example.named_fragment_without_implementation.type.Query as CompiledQuery public class TestQuery() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_without_implementation/kotlin/responseBased/named_fragment_without_implementation/TestQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_without_implementation/kotlin/responseBased/named_fragment_without_implementation/TestQuery.kt.expected index 9e17c2fad90..d28137edccb 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_without_implementation/kotlin/responseBased/named_fragment_without_implementation/TestQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/named_fragment_without_implementation/kotlin/responseBased/named_fragment_without_implementation/TestQuery.kt.expected @@ -25,6 +25,8 @@ import kotlin.Suppress import com.example.named_fragment_without_implementation.type.Query as CompiledQuery public class TestQuery() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/nested_conditional_inline/java/operationBased/nested_conditional_inline/TestQuery.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/nested_conditional_inline/java/operationBased/nested_conditional_inline/TestQuery.java.expected index b433bd30562..f2cb98871f6 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/nested_conditional_inline/java/operationBased/nested_conditional_inline/TestQuery.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/nested_conditional_inline/java/operationBased/nested_conditional_inline/TestQuery.java.expected @@ -145,6 +145,11 @@ public class TestQuery implements Query { .build(); } + @Override + public boolean getIgnoreErrors() { + return false; + } + public static final class Builder { private Optional episode = Optional.absent(); diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/nested_conditional_inline/kotlin/operationBased/nested_conditional_inline/TestQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/nested_conditional_inline/kotlin/operationBased/nested_conditional_inline/TestQuery.kt.expected index 37c86b805d3..2f57ed35409 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/nested_conditional_inline/kotlin/operationBased/nested_conditional_inline/TestQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/nested_conditional_inline/kotlin/operationBased/nested_conditional_inline/TestQuery.kt.expected @@ -26,6 +26,8 @@ import com.example.nested_conditional_inline.type.Query as CompiledQuery public data class TestQuery( public val episode: Optional = Optional.Absent, ) : Query { + override val ignoreErrors: Boolean = false + override fun id(): String = OPERATION_ID override fun document(): String = OPERATION_DOCUMENT diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/nested_conditional_inline/kotlin/responseBased/nested_conditional_inline/TestQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/nested_conditional_inline/kotlin/responseBased/nested_conditional_inline/TestQuery.kt.expected index 0a779c56e6b..d2749340f7c 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/nested_conditional_inline/kotlin/responseBased/nested_conditional_inline/TestQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/nested_conditional_inline/kotlin/responseBased/nested_conditional_inline/TestQuery.kt.expected @@ -27,6 +27,8 @@ import com.example.nested_conditional_inline.type.Query as CompiledQuery public data class TestQuery( public val episode: Optional = Optional.Absent, ) : Query { + override val ignoreErrors: Boolean = false + override fun id(): String = OPERATION_ID override fun document(): String = OPERATION_DOCUMENT diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/nested_field_with_multiple_fieldsets/java/operationBased/nested_field_with_multiple_fieldsets/TestQuery.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/nested_field_with_multiple_fieldsets/java/operationBased/nested_field_with_multiple_fieldsets/TestQuery.java.expected index 4dc71f7aa52..a580650bf2b 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/nested_field_with_multiple_fieldsets/java/operationBased/nested_field_with_multiple_fieldsets/TestQuery.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/nested_field_with_multiple_fieldsets/java/operationBased/nested_field_with_multiple_fieldsets/TestQuery.java.expected @@ -137,6 +137,11 @@ public class TestQuery implements Query { .build(); } + @Override + public boolean getIgnoreErrors() { + return false; + } + public static final class Builder { Builder() { } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/nested_field_with_multiple_fieldsets/kotlin/operationBased/nested_field_with_multiple_fieldsets/TestQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/nested_field_with_multiple_fieldsets/kotlin/operationBased/nested_field_with_multiple_fieldsets/TestQuery.kt.expected index db18ea3bced..2d3f34d3253 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/nested_field_with_multiple_fieldsets/kotlin/operationBased/nested_field_with_multiple_fieldsets/TestQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/nested_field_with_multiple_fieldsets/kotlin/operationBased/nested_field_with_multiple_fieldsets/TestQuery.kt.expected @@ -21,6 +21,8 @@ import kotlin.String import com.example.nested_field_with_multiple_fieldsets.type.Query as CompiledQuery public class TestQuery() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/nested_field_with_multiple_fieldsets/kotlin/responseBased/nested_field_with_multiple_fieldsets/TestQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/nested_field_with_multiple_fieldsets/kotlin/responseBased/nested_field_with_multiple_fieldsets/TestQuery.kt.expected index 1a286ff4d6c..e344bd3e24d 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/nested_field_with_multiple_fieldsets/kotlin/responseBased/nested_field_with_multiple_fieldsets/TestQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/nested_field_with_multiple_fieldsets/kotlin/responseBased/nested_field_with_multiple_fieldsets/TestQuery.kt.expected @@ -22,6 +22,8 @@ import kotlin.Suppress import com.example.nested_field_with_multiple_fieldsets.type.Query as CompiledQuery public class TestQuery() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/nested_named_fragments/java/operationBased/nested_named_fragments/AllStarships.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/nested_named_fragments/java/operationBased/nested_named_fragments/AllStarships.java.expected index 535c6977dc7..57e6ceac429 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/nested_named_fragments/java/operationBased/nested_named_fragments/AllStarships.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/nested_named_fragments/java/operationBased/nested_named_fragments/AllStarships.java.expected @@ -148,6 +148,11 @@ public class AllStarships implements Query { .build(); } + @Override + public boolean getIgnoreErrors() { + return false; + } + public static final class Builder { Builder() { } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/nested_named_fragments/java/operationBased/nested_named_fragments/fragment/PilotFragmentImpl.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/nested_named_fragments/java/operationBased/nested_named_fragments/fragment/PilotFragmentImpl.java.expected index b16f8d0eed4..7ffd96444c5 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/nested_named_fragments/java/operationBased/nested_named_fragments/fragment/PilotFragmentImpl.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/nested_named_fragments/java/operationBased/nested_named_fragments/fragment/PilotFragmentImpl.java.expected @@ -79,4 +79,9 @@ public class PilotFragmentImpl implements Fragment { .selections(pilotFragmentSelections.__root) .build(); } + + @Override + public boolean getIgnoreErrors() { + return false; + } } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/nested_named_fragments/java/operationBased/nested_named_fragments/fragment/PlanetFragmentImpl.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/nested_named_fragments/java/operationBased/nested_named_fragments/fragment/PlanetFragmentImpl.java.expected index 892a3301f45..442849b87cf 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/nested_named_fragments/java/operationBased/nested_named_fragments/fragment/PlanetFragmentImpl.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/nested_named_fragments/java/operationBased/nested_named_fragments/fragment/PlanetFragmentImpl.java.expected @@ -79,4 +79,9 @@ public class PlanetFragmentImpl implements Fragment { .selections(planetFragmentSelections.__root) .build(); } + + @Override + public boolean getIgnoreErrors() { + return false; + } } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/nested_named_fragments/java/operationBased/nested_named_fragments/fragment/StarshipFragmentImpl.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/nested_named_fragments/java/operationBased/nested_named_fragments/fragment/StarshipFragmentImpl.java.expected index 96f493fba0d..80dcd640e8d 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/nested_named_fragments/java/operationBased/nested_named_fragments/fragment/StarshipFragmentImpl.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/nested_named_fragments/java/operationBased/nested_named_fragments/fragment/StarshipFragmentImpl.java.expected @@ -79,4 +79,9 @@ public class StarshipFragmentImpl implements Fragment { .selections(starshipFragmentSelections.__root) .build(); } + + @Override + public boolean getIgnoreErrors() { + return false; + } } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/nested_named_fragments/kotlin/operationBased/nested_named_fragments/AllStarships.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/nested_named_fragments/kotlin/operationBased/nested_named_fragments/AllStarships.kt.expected index 6cdef690eae..d6b562bfa56 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/nested_named_fragments/kotlin/operationBased/nested_named_fragments/AllStarships.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/nested_named_fragments/kotlin/operationBased/nested_named_fragments/AllStarships.kt.expected @@ -23,6 +23,8 @@ import kotlin.collections.List import com.example.nested_named_fragments.type.Root as CompiledRoot public class AllStarships() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/nested_named_fragments/kotlin/operationBased/nested_named_fragments/fragment/PilotFragmentImpl.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/nested_named_fragments/kotlin/operationBased/nested_named_fragments/fragment/PilotFragmentImpl.kt.expected index 5dd0d423c5b..898ff0d94c2 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/nested_named_fragments/kotlin/operationBased/nested_named_fragments/fragment/PilotFragmentImpl.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/nested_named_fragments/kotlin/operationBased/nested_named_fragments/fragment/PilotFragmentImpl.kt.expected @@ -18,6 +18,8 @@ import kotlin.Boolean import kotlin.Int public class PilotFragmentImpl() : Fragment { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/nested_named_fragments/kotlin/operationBased/nested_named_fragments/fragment/PlanetFragmentImpl.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/nested_named_fragments/kotlin/operationBased/nested_named_fragments/fragment/PlanetFragmentImpl.kt.expected index 0030bfbd2bb..0f1c5a35dc5 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/nested_named_fragments/kotlin/operationBased/nested_named_fragments/fragment/PlanetFragmentImpl.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/nested_named_fragments/kotlin/operationBased/nested_named_fragments/fragment/PlanetFragmentImpl.kt.expected @@ -18,6 +18,8 @@ import kotlin.Boolean import kotlin.Int public class PlanetFragmentImpl() : Fragment { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/nested_named_fragments/kotlin/operationBased/nested_named_fragments/fragment/StarshipFragmentImpl.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/nested_named_fragments/kotlin/operationBased/nested_named_fragments/fragment/StarshipFragmentImpl.kt.expected index 7238b556d1d..4622db0831c 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/nested_named_fragments/kotlin/operationBased/nested_named_fragments/fragment/StarshipFragmentImpl.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/nested_named_fragments/kotlin/operationBased/nested_named_fragments/fragment/StarshipFragmentImpl.kt.expected @@ -18,6 +18,8 @@ import kotlin.Boolean import kotlin.Int public class StarshipFragmentImpl() : Fragment { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/nested_named_fragments/kotlin/responseBased/nested_named_fragments/AllStarships.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/nested_named_fragments/kotlin/responseBased/nested_named_fragments/AllStarships.kt.expected index ac03dba3368..19b1418bba2 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/nested_named_fragments/kotlin/responseBased/nested_named_fragments/AllStarships.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/nested_named_fragments/kotlin/responseBased/nested_named_fragments/AllStarships.kt.expected @@ -26,6 +26,8 @@ import kotlin.collections.List import com.example.nested_named_fragments.type.Root as CompiledRoot public class AllStarships() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/nested_named_fragments/kotlin/responseBased/nested_named_fragments/fragment/PilotFragmentImpl.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/nested_named_fragments/kotlin/responseBased/nested_named_fragments/fragment/PilotFragmentImpl.kt.expected index 71f62a3c8d6..0382b494288 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/nested_named_fragments/kotlin/responseBased/nested_named_fragments/fragment/PilotFragmentImpl.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/nested_named_fragments/kotlin/responseBased/nested_named_fragments/fragment/PilotFragmentImpl.kt.expected @@ -20,6 +20,8 @@ import kotlin.String import kotlin.Suppress public class PilotFragmentImpl() : Fragment { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/nested_named_fragments/kotlin/responseBased/nested_named_fragments/fragment/PlanetFragmentImpl.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/nested_named_fragments/kotlin/responseBased/nested_named_fragments/fragment/PlanetFragmentImpl.kt.expected index 9a0c90ffbfa..a3b6398e987 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/nested_named_fragments/kotlin/responseBased/nested_named_fragments/fragment/PlanetFragmentImpl.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/nested_named_fragments/kotlin/responseBased/nested_named_fragments/fragment/PlanetFragmentImpl.kt.expected @@ -19,6 +19,8 @@ import kotlin.Int import kotlin.String public class PlanetFragmentImpl() : Fragment { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/nested_named_fragments/kotlin/responseBased/nested_named_fragments/fragment/StarshipFragmentImpl.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/nested_named_fragments/kotlin/responseBased/nested_named_fragments/fragment/StarshipFragmentImpl.kt.expected index 74761f29cf7..f766d0e9102 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/nested_named_fragments/kotlin/responseBased/nested_named_fragments/fragment/StarshipFragmentImpl.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/nested_named_fragments/kotlin/responseBased/nested_named_fragments/fragment/StarshipFragmentImpl.kt.expected @@ -21,6 +21,8 @@ import kotlin.Suppress import kotlin.collections.List public class StarshipFragmentImpl() : Fragment { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/nonnull/java/operationBased/nonnull/TestQuery.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/nonnull/java/operationBased/nonnull/TestQuery.java.expected index e8dc3e09721..8dc05535e44 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/nonnull/java/operationBased/nonnull/TestQuery.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/nonnull/java/operationBased/nonnull/TestQuery.java.expected @@ -115,6 +115,11 @@ public class TestQuery implements Query { .build(); } + @Override + public boolean getIgnoreErrors() { + return false; + } + public static final class Builder { Builder() { } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/nonnull/kotlin/responseBased/nonnull/TestQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/nonnull/kotlin/responseBased/nonnull/TestQuery.kt.expected index 27dcbcd5653..18694c555c4 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/nonnull/kotlin/responseBased/nonnull/TestQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/nonnull/kotlin/responseBased/nonnull/TestQuery.kt.expected @@ -21,6 +21,8 @@ import kotlin.String import com.example.nonnull.type.Query as CompiledQuery public class TestQuery() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/not_all_combinations_are_needed/java/operationBased/not_all_combinations_are_needed/TestQuery.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/not_all_combinations_are_needed/java/operationBased/not_all_combinations_are_needed/TestQuery.java.expected index 7843f140bfc..da5141c2d3c 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/not_all_combinations_are_needed/java/operationBased/not_all_combinations_are_needed/TestQuery.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/not_all_combinations_are_needed/java/operationBased/not_all_combinations_are_needed/TestQuery.java.expected @@ -128,6 +128,11 @@ public class TestQuery implements Query { .build(); } + @Override + public boolean getIgnoreErrors() { + return false; + } + public static final class Builder { Builder() { } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/not_all_combinations_are_needed/java/operationBased/not_all_combinations_are_needed/fragment/BFragmentImpl.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/not_all_combinations_are_needed/java/operationBased/not_all_combinations_are_needed/fragment/BFragmentImpl.java.expected index 9f0ec05aa0e..474ddd1223c 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/not_all_combinations_are_needed/java/operationBased/not_all_combinations_are_needed/fragment/BFragmentImpl.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/not_all_combinations_are_needed/java/operationBased/not_all_combinations_are_needed/fragment/BFragmentImpl.java.expected @@ -79,4 +79,9 @@ public class BFragmentImpl implements Fragment { .selections(bFragmentSelections.__root) .build(); } + + @Override + public boolean getIgnoreErrors() { + return false; + } } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/not_all_combinations_are_needed/kotlin/operationBased/not_all_combinations_are_needed/TestQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/not_all_combinations_are_needed/kotlin/operationBased/not_all_combinations_are_needed/TestQuery.kt.expected index 92b106e9659..a331bf09ab2 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/not_all_combinations_are_needed/kotlin/operationBased/not_all_combinations_are_needed/TestQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/not_all_combinations_are_needed/kotlin/operationBased/not_all_combinations_are_needed/TestQuery.kt.expected @@ -22,6 +22,8 @@ import kotlin.String import com.example.not_all_combinations_are_needed.type.Query as CompiledQuery public class TestQuery() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/not_all_combinations_are_needed/kotlin/operationBased/not_all_combinations_are_needed/fragment/BFragmentImpl.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/not_all_combinations_are_needed/kotlin/operationBased/not_all_combinations_are_needed/fragment/BFragmentImpl.kt.expected index 2ab2b297752..63cfc0c3dcd 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/not_all_combinations_are_needed/kotlin/operationBased/not_all_combinations_are_needed/fragment/BFragmentImpl.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/not_all_combinations_are_needed/kotlin/operationBased/not_all_combinations_are_needed/fragment/BFragmentImpl.kt.expected @@ -18,6 +18,8 @@ import kotlin.Boolean import kotlin.Int public class BFragmentImpl() : Fragment { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/not_all_combinations_are_needed/kotlin/responseBased/not_all_combinations_are_needed/TestQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/not_all_combinations_are_needed/kotlin/responseBased/not_all_combinations_are_needed/TestQuery.kt.expected index a83efecce8f..26d9c63a240 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/not_all_combinations_are_needed/kotlin/responseBased/not_all_combinations_are_needed/TestQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/not_all_combinations_are_needed/kotlin/responseBased/not_all_combinations_are_needed/TestQuery.kt.expected @@ -23,6 +23,8 @@ import kotlin.Suppress import com.example.not_all_combinations_are_needed.type.Query as CompiledQuery public class TestQuery() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/not_all_combinations_are_needed/kotlin/responseBased/not_all_combinations_are_needed/fragment/BFragmentImpl.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/not_all_combinations_are_needed/kotlin/responseBased/not_all_combinations_are_needed/fragment/BFragmentImpl.kt.expected index 609feccba29..7b1b8d4fc11 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/not_all_combinations_are_needed/kotlin/responseBased/not_all_combinations_are_needed/fragment/BFragmentImpl.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/not_all_combinations_are_needed/kotlin/responseBased/not_all_combinations_are_needed/fragment/BFragmentImpl.kt.expected @@ -19,6 +19,8 @@ import kotlin.Int import kotlin.String public class BFragmentImpl() : Fragment { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/object/java/operationBased/object/TestQuery.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/object/java/operationBased/object/TestQuery.java.expected index 5b127f65a17..fb89909130f 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/object/java/operationBased/object/TestQuery.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/object/java/operationBased/object/TestQuery.java.expected @@ -115,6 +115,11 @@ public class TestQuery implements Query { .build(); } + @Override + public boolean getIgnoreErrors() { + return false; + } + public static final class Builder { Builder() { } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/object/kotlin/responseBased/object/TestQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/object/kotlin/responseBased/object/TestQuery.kt.expected index 0933901c169..18b0a6dc2c3 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/object/kotlin/responseBased/object/TestQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/object/kotlin/responseBased/object/TestQuery.kt.expected @@ -21,6 +21,8 @@ import kotlin.String import com.example.`object`.type.Query as CompiledQuery public class TestQuery() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/operation_id_generator/java/operationBased/operation_id_generator/TestQuery.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/operation_id_generator/java/operationBased/operation_id_generator/TestQuery.java.expected index 135c08e62d9..2897cb87588 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/operation_id_generator/java/operationBased/operation_id_generator/TestQuery.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/operation_id_generator/java/operationBased/operation_id_generator/TestQuery.java.expected @@ -116,6 +116,11 @@ public class TestQuery implements Query { .build(); } + @Override + public boolean getIgnoreErrors() { + return false; + } + public static final class Builder { Builder() { } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/operation_id_generator/kotlin/responseBased/operation_id_generator/TestQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/operation_id_generator/kotlin/responseBased/operation_id_generator/TestQuery.kt.expected index 8fe4bc50828..beddbf3cbf4 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/operation_id_generator/kotlin/responseBased/operation_id_generator/TestQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/operation_id_generator/kotlin/responseBased/operation_id_generator/TestQuery.kt.expected @@ -21,6 +21,8 @@ import kotlin.String import com.example.operation_id_generator.type.Query as CompiledQuery public class TestQuery() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/operationbased2_ex7/java/operationBased/operationbased2_ex7/TestOperation.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/operationbased2_ex7/java/operationBased/operationbased2_ex7/TestOperation.java.expected index 297e307ed9f..1684db5fb65 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/operationbased2_ex7/java/operationBased/operationbased2_ex7/TestOperation.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/operationbased2_ex7/java/operationBased/operationbased2_ex7/TestOperation.java.expected @@ -126,6 +126,11 @@ public class TestOperation implements Query { .build(); } + @Override + public boolean getIgnoreErrors() { + return false; + } + public static final class Builder { Builder() { } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/operationbased2_ex7/kotlin/operationBased/operationbased2_ex7/TestOperation.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/operationbased2_ex7/kotlin/operationBased/operationbased2_ex7/TestOperation.kt.expected index b6891ae5e30..eadeb6be72f 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/operationbased2_ex7/kotlin/operationBased/operationbased2_ex7/TestOperation.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/operationbased2_ex7/kotlin/operationBased/operationbased2_ex7/TestOperation.kt.expected @@ -21,6 +21,8 @@ import kotlin.String import com.example.operationbased2_ex7.type.Query as CompiledQuery public class TestOperation() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/operationbased2_ex7/kotlin/responseBased/operationbased2_ex7/TestOperation.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/operationbased2_ex7/kotlin/responseBased/operationbased2_ex7/TestOperation.kt.expected index be66f278ad4..66ad3ff89a5 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/operationbased2_ex7/kotlin/responseBased/operationbased2_ex7/TestOperation.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/operationbased2_ex7/kotlin/responseBased/operationbased2_ex7/TestOperation.kt.expected @@ -22,6 +22,8 @@ import kotlin.Suppress import com.example.operationbased2_ex7.type.Query as CompiledQuery public class TestOperation() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/operationbased2_ex8/java/operationBased/operationbased2_ex8/TestOperation.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/operationbased2_ex8/java/operationBased/operationbased2_ex8/TestOperation.java.expected index 69f5251b292..2eefdbbd9d4 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/operationbased2_ex8/java/operationBased/operationbased2_ex8/TestOperation.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/operationbased2_ex8/java/operationBased/operationbased2_ex8/TestOperation.java.expected @@ -131,6 +131,11 @@ public class TestOperation implements Query { .build(); } + @Override + public boolean getIgnoreErrors() { + return false; + } + public static final class Builder { Builder() { } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/operationbased2_ex8/java/operationBased/operationbased2_ex8/fragment/AnimalFragmentImpl.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/operationbased2_ex8/java/operationBased/operationbased2_ex8/fragment/AnimalFragmentImpl.java.expected index 044a7a732e4..0fc29894edb 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/operationbased2_ex8/java/operationBased/operationbased2_ex8/fragment/AnimalFragmentImpl.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/operationbased2_ex8/java/operationBased/operationbased2_ex8/fragment/AnimalFragmentImpl.java.expected @@ -79,4 +79,9 @@ public class AnimalFragmentImpl implements Fragment { .selections(AnimalFragmentSelections.__root) .build(); } + + @Override + public boolean getIgnoreErrors() { + return false; + } } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/operationbased2_ex8/kotlin/operationBased/operationbased2_ex8/TestOperation.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/operationbased2_ex8/kotlin/operationBased/operationbased2_ex8/TestOperation.kt.expected index c275aec3b05..8f6536a1883 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/operationbased2_ex8/kotlin/operationBased/operationbased2_ex8/TestOperation.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/operationbased2_ex8/kotlin/operationBased/operationbased2_ex8/TestOperation.kt.expected @@ -22,6 +22,8 @@ import kotlin.String import com.example.operationbased2_ex8.type.Query as CompiledQuery public class TestOperation() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/operationbased2_ex8/kotlin/operationBased/operationbased2_ex8/fragment/AnimalFragmentImpl.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/operationbased2_ex8/kotlin/operationBased/operationbased2_ex8/fragment/AnimalFragmentImpl.kt.expected index 51e7d146e3e..a91da5fe9d4 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/operationbased2_ex8/kotlin/operationBased/operationbased2_ex8/fragment/AnimalFragmentImpl.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/operationbased2_ex8/kotlin/operationBased/operationbased2_ex8/fragment/AnimalFragmentImpl.kt.expected @@ -18,6 +18,8 @@ import kotlin.Boolean import kotlin.Int public class AnimalFragmentImpl() : Fragment { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/operationbased2_ex8/kotlin/responseBased/operationbased2_ex8/TestOperation.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/operationbased2_ex8/kotlin/responseBased/operationbased2_ex8/TestOperation.kt.expected index f08ad465192..f89b08016a4 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/operationbased2_ex8/kotlin/responseBased/operationbased2_ex8/TestOperation.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/operationbased2_ex8/kotlin/responseBased/operationbased2_ex8/TestOperation.kt.expected @@ -23,6 +23,8 @@ import kotlin.Suppress import com.example.operationbased2_ex8.type.Query as CompiledQuery public class TestOperation() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/operationbased2_ex8/kotlin/responseBased/operationbased2_ex8/fragment/AnimalFragmentImpl.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/operationbased2_ex8/kotlin/responseBased/operationbased2_ex8/fragment/AnimalFragmentImpl.kt.expected index 01237b3b2bb..a6697a3eaf5 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/operationbased2_ex8/kotlin/responseBased/operationbased2_ex8/fragment/AnimalFragmentImpl.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/operationbased2_ex8/kotlin/responseBased/operationbased2_ex8/fragment/AnimalFragmentImpl.kt.expected @@ -20,6 +20,8 @@ import kotlin.String import kotlin.Suppress public class AnimalFragmentImpl() : Fragment { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/optional/java/operationBased/optional/TestQuery.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/optional/java/operationBased/optional/TestQuery.java.expected index ea2c2773cf4..521e0620e19 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/optional/java/operationBased/optional/TestQuery.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/optional/java/operationBased/optional/TestQuery.java.expected @@ -118,6 +118,11 @@ public class TestQuery implements Query { .build(); } + @Override + public boolean getIgnoreErrors() { + return false; + } + public static final class Builder { Builder() { } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/optional/kotlin/responseBased/optional/TestQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/optional/kotlin/responseBased/optional/TestQuery.kt.expected index fd664e30faa..f4415ffa45f 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/optional/kotlin/responseBased/optional/TestQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/optional/kotlin/responseBased/optional/TestQuery.kt.expected @@ -23,6 +23,8 @@ import kotlin.collections.List import com.example.optional.type.Query as CompiledQuery public class TestQuery() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/path_vs_flat_accessors/java/operationBased/path_vs_flat_accessors/TestQuery.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/path_vs_flat_accessors/java/operationBased/path_vs_flat_accessors/TestQuery.java.expected index 2f7d1e1802c..1e3d91eb509 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/path_vs_flat_accessors/java/operationBased/path_vs_flat_accessors/TestQuery.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/path_vs_flat_accessors/java/operationBased/path_vs_flat_accessors/TestQuery.java.expected @@ -124,6 +124,11 @@ public class TestQuery implements Query { .build(); } + @Override + public boolean getIgnoreErrors() { + return false; + } + public static final class Builder { Builder() { } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/path_vs_flat_accessors/kotlin/operationBased/path_vs_flat_accessors/TestQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/path_vs_flat_accessors/kotlin/operationBased/path_vs_flat_accessors/TestQuery.kt.expected index 28ac8a8187b..bdd07ff0a94 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/path_vs_flat_accessors/kotlin/operationBased/path_vs_flat_accessors/TestQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/path_vs_flat_accessors/kotlin/operationBased/path_vs_flat_accessors/TestQuery.kt.expected @@ -21,6 +21,8 @@ import kotlin.String import com.example.path_vs_flat_accessors.type.Query as CompiledQuery public class TestQuery() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/path_vs_flat_accessors/kotlin/responseBased/path_vs_flat_accessors/TestQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/path_vs_flat_accessors/kotlin/responseBased/path_vs_flat_accessors/TestQuery.kt.expected index 0e9611a7cde..5e3e35a455c 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/path_vs_flat_accessors/kotlin/responseBased/path_vs_flat_accessors/TestQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/path_vs_flat_accessors/kotlin/responseBased/path_vs_flat_accessors/TestQuery.kt.expected @@ -22,6 +22,8 @@ import kotlin.Suppress import com.example.path_vs_flat_accessors.type.Query as CompiledQuery public class TestQuery() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/recursive_selection/java/operationBased/recursive_selection/TestQuery.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/recursive_selection/java/operationBased/recursive_selection/TestQuery.java.expected index e7fae74db51..99d1682dc0f 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/recursive_selection/java/operationBased/recursive_selection/TestQuery.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/recursive_selection/java/operationBased/recursive_selection/TestQuery.java.expected @@ -122,6 +122,11 @@ public class TestQuery implements Query { .build(); } + @Override + public boolean getIgnoreErrors() { + return false; + } + public static final class Builder { Builder() { } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/recursive_selection/kotlin/responseBased/recursive_selection/TestQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/recursive_selection/kotlin/responseBased/recursive_selection/TestQuery.kt.expected index 2e2f7fb3a1f..08363b081d5 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/recursive_selection/kotlin/responseBased/recursive_selection/TestQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/recursive_selection/kotlin/responseBased/recursive_selection/TestQuery.kt.expected @@ -22,6 +22,8 @@ import kotlin.collections.List import com.example.recursive_selection.type.Query as CompiledQuery public class TestQuery() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/reserved_keywords/java/operationBased/reserved_keywords/TestQuery.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/reserved_keywords/java/operationBased/reserved_keywords/TestQuery.java.expected index 75f238c1244..a1281795c91 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/reserved_keywords/java/operationBased/reserved_keywords/TestQuery.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/reserved_keywords/java/operationBased/reserved_keywords/TestQuery.java.expected @@ -122,6 +122,11 @@ public class TestQuery implements Query { .build(); } + @Override + public boolean getIgnoreErrors() { + return false; + } + public static final class Builder { Builder() { } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/reserved_keywords/kotlin/operationBased/reserved_keywords/TestQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/reserved_keywords/kotlin/operationBased/reserved_keywords/TestQuery.kt.expected index 04c27b99d80..ad944675ca4 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/reserved_keywords/kotlin/operationBased/reserved_keywords/TestQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/reserved_keywords/kotlin/operationBased/reserved_keywords/TestQuery.kt.expected @@ -22,6 +22,8 @@ import kotlin.collections.List import com.example.reserved_keywords.type.Query as CompiledQuery public class TestQuery() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/reserved_keywords/kotlin/responseBased/reserved_keywords/TestQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/reserved_keywords/kotlin/responseBased/reserved_keywords/TestQuery.kt.expected index b8b5037791d..9d4ba1e870d 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/reserved_keywords/kotlin/responseBased/reserved_keywords/TestQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/reserved_keywords/kotlin/responseBased/reserved_keywords/TestQuery.kt.expected @@ -23,6 +23,8 @@ import kotlin.collections.List import com.example.reserved_keywords.type.Query as CompiledQuery public class TestQuery() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/root_query_fragment/java/operationBased/root_query_fragment/TestQuery.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/root_query_fragment/java/operationBased/root_query_fragment/TestQuery.java.expected index 7cadda244ca..fa6e4dcfd37 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/root_query_fragment/java/operationBased/root_query_fragment/TestQuery.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/root_query_fragment/java/operationBased/root_query_fragment/TestQuery.java.expected @@ -122,6 +122,11 @@ public class TestQuery implements Query { .build(); } + @Override + public boolean getIgnoreErrors() { + return false; + } + public static final class Builder { Builder() { } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/root_query_fragment/java/operationBased/root_query_fragment/fragment/QueryFragmentImpl.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/root_query_fragment/java/operationBased/root_query_fragment/fragment/QueryFragmentImpl.java.expected index 78ea577e5a9..197a45fd908 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/root_query_fragment/java/operationBased/root_query_fragment/fragment/QueryFragmentImpl.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/root_query_fragment/java/operationBased/root_query_fragment/fragment/QueryFragmentImpl.java.expected @@ -79,4 +79,9 @@ public class QueryFragmentImpl implements Fragment { .selections(QueryFragmentSelections.__root) .build(); } + + @Override + public boolean getIgnoreErrors() { + return false; + } } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/root_query_fragment/kotlin/operationBased/root_query_fragment/TestQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/root_query_fragment/kotlin/operationBased/root_query_fragment/TestQuery.kt.expected index e9f97752557..ad4a89a983c 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/root_query_fragment/kotlin/operationBased/root_query_fragment/TestQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/root_query_fragment/kotlin/operationBased/root_query_fragment/TestQuery.kt.expected @@ -22,6 +22,8 @@ import kotlin.String import com.example.root_query_fragment.type.Query as CompiledQuery public class TestQuery() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/root_query_fragment/kotlin/operationBased/root_query_fragment/fragment/QueryFragmentImpl.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/root_query_fragment/kotlin/operationBased/root_query_fragment/fragment/QueryFragmentImpl.kt.expected index 5db892c8f35..33b31e64c64 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/root_query_fragment/kotlin/operationBased/root_query_fragment/fragment/QueryFragmentImpl.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/root_query_fragment/kotlin/operationBased/root_query_fragment/fragment/QueryFragmentImpl.kt.expected @@ -18,6 +18,8 @@ import kotlin.Boolean import kotlin.Int public class QueryFragmentImpl() : Fragment { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/root_query_fragment/kotlin/responseBased/root_query_fragment/TestQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/root_query_fragment/kotlin/responseBased/root_query_fragment/TestQuery.kt.expected index 09775a633c6..4e3e5ce35fe 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/root_query_fragment/kotlin/responseBased/root_query_fragment/TestQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/root_query_fragment/kotlin/responseBased/root_query_fragment/TestQuery.kt.expected @@ -23,6 +23,8 @@ import kotlin.Suppress import com.example.root_query_fragment.type.Query as CompiledQuery public class TestQuery() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/root_query_fragment/kotlin/responseBased/root_query_fragment/fragment/QueryFragmentImpl.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/root_query_fragment/kotlin/responseBased/root_query_fragment/fragment/QueryFragmentImpl.kt.expected index 1a0c17aa6f4..8b3994f5033 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/root_query_fragment/kotlin/responseBased/root_query_fragment/fragment/QueryFragmentImpl.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/root_query_fragment/kotlin/responseBased/root_query_fragment/fragment/QueryFragmentImpl.kt.expected @@ -19,6 +19,8 @@ import kotlin.Int import kotlin.String public class QueryFragmentImpl() : Fragment { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/root_query_fragment_with_nested_fragments/java/operationBased/root_query_fragment_with_nested_fragments/TestQuery.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/root_query_fragment_with_nested_fragments/java/operationBased/root_query_fragment_with_nested_fragments/TestQuery.java.expected index d059b167612..0fa90169233 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/root_query_fragment_with_nested_fragments/java/operationBased/root_query_fragment_with_nested_fragments/TestQuery.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/root_query_fragment_with_nested_fragments/java/operationBased/root_query_fragment_with_nested_fragments/TestQuery.java.expected @@ -143,6 +143,11 @@ public class TestQuery implements Query { .build(); } + @Override + public boolean getIgnoreErrors() { + return false; + } + public static final class Builder { Builder() { } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/root_query_fragment_with_nested_fragments/java/operationBased/root_query_fragment_with_nested_fragments/fragment/DroidFragmentImpl.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/root_query_fragment_with_nested_fragments/java/operationBased/root_query_fragment_with_nested_fragments/fragment/DroidFragmentImpl.java.expected index 30fa86b073c..f3a8d9e0a38 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/root_query_fragment_with_nested_fragments/java/operationBased/root_query_fragment_with_nested_fragments/fragment/DroidFragmentImpl.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/root_query_fragment_with_nested_fragments/java/operationBased/root_query_fragment_with_nested_fragments/fragment/DroidFragmentImpl.java.expected @@ -79,4 +79,9 @@ public class DroidFragmentImpl implements Fragment { .selections(droidFragmentSelections.__root) .build(); } + + @Override + public boolean getIgnoreErrors() { + return false; + } } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/root_query_fragment_with_nested_fragments/java/operationBased/root_query_fragment_with_nested_fragments/fragment/HeroFragmentImpl.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/root_query_fragment_with_nested_fragments/java/operationBased/root_query_fragment_with_nested_fragments/fragment/HeroFragmentImpl.java.expected index 7f24883657f..3217efe81df 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/root_query_fragment_with_nested_fragments/java/operationBased/root_query_fragment_with_nested_fragments/fragment/HeroFragmentImpl.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/root_query_fragment_with_nested_fragments/java/operationBased/root_query_fragment_with_nested_fragments/fragment/HeroFragmentImpl.java.expected @@ -79,4 +79,9 @@ public class HeroFragmentImpl implements Fragment { .selections(heroFragmentSelections.__root) .build(); } + + @Override + public boolean getIgnoreErrors() { + return false; + } } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/root_query_fragment_with_nested_fragments/java/operationBased/root_query_fragment_with_nested_fragments/fragment/QueryFragmentImpl.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/root_query_fragment_with_nested_fragments/java/operationBased/root_query_fragment_with_nested_fragments/fragment/QueryFragmentImpl.java.expected index 4645e845b17..777fb902759 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/root_query_fragment_with_nested_fragments/java/operationBased/root_query_fragment_with_nested_fragments/fragment/QueryFragmentImpl.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/root_query_fragment_with_nested_fragments/java/operationBased/root_query_fragment_with_nested_fragments/fragment/QueryFragmentImpl.java.expected @@ -79,4 +79,9 @@ public class QueryFragmentImpl implements Fragment { .selections(QueryFragmentSelections.__root) .build(); } + + @Override + public boolean getIgnoreErrors() { + return false; + } } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/root_query_fragment_with_nested_fragments/kotlin/operationBased/root_query_fragment_with_nested_fragments/TestQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/root_query_fragment_with_nested_fragments/kotlin/operationBased/root_query_fragment_with_nested_fragments/TestQuery.kt.expected index 9cb000f4693..a744d896f09 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/root_query_fragment_with_nested_fragments/kotlin/operationBased/root_query_fragment_with_nested_fragments/TestQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/root_query_fragment_with_nested_fragments/kotlin/operationBased/root_query_fragment_with_nested_fragments/TestQuery.kt.expected @@ -22,6 +22,8 @@ import kotlin.String import com.example.root_query_fragment_with_nested_fragments.type.Query as CompiledQuery public class TestQuery() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/root_query_fragment_with_nested_fragments/kotlin/operationBased/root_query_fragment_with_nested_fragments/fragment/DroidFragmentImpl.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/root_query_fragment_with_nested_fragments/kotlin/operationBased/root_query_fragment_with_nested_fragments/fragment/DroidFragmentImpl.kt.expected index 9da890770ac..9fad8bcbe67 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/root_query_fragment_with_nested_fragments/kotlin/operationBased/root_query_fragment_with_nested_fragments/fragment/DroidFragmentImpl.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/root_query_fragment_with_nested_fragments/kotlin/operationBased/root_query_fragment_with_nested_fragments/fragment/DroidFragmentImpl.kt.expected @@ -18,6 +18,8 @@ import kotlin.Boolean import kotlin.Int public class DroidFragmentImpl() : Fragment { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/root_query_fragment_with_nested_fragments/kotlin/operationBased/root_query_fragment_with_nested_fragments/fragment/HeroFragmentImpl.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/root_query_fragment_with_nested_fragments/kotlin/operationBased/root_query_fragment_with_nested_fragments/fragment/HeroFragmentImpl.kt.expected index d3f62bc2790..caaf6cd0ed2 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/root_query_fragment_with_nested_fragments/kotlin/operationBased/root_query_fragment_with_nested_fragments/fragment/HeroFragmentImpl.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/root_query_fragment_with_nested_fragments/kotlin/operationBased/root_query_fragment_with_nested_fragments/fragment/HeroFragmentImpl.kt.expected @@ -18,6 +18,8 @@ import kotlin.Boolean import kotlin.Int public class HeroFragmentImpl() : Fragment { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/root_query_fragment_with_nested_fragments/kotlin/operationBased/root_query_fragment_with_nested_fragments/fragment/QueryFragmentImpl.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/root_query_fragment_with_nested_fragments/kotlin/operationBased/root_query_fragment_with_nested_fragments/fragment/QueryFragmentImpl.kt.expected index f8938eeadcf..062223a15c4 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/root_query_fragment_with_nested_fragments/kotlin/operationBased/root_query_fragment_with_nested_fragments/fragment/QueryFragmentImpl.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/root_query_fragment_with_nested_fragments/kotlin/operationBased/root_query_fragment_with_nested_fragments/fragment/QueryFragmentImpl.kt.expected @@ -18,6 +18,8 @@ import kotlin.Boolean import kotlin.Int public class QueryFragmentImpl() : Fragment { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/root_query_fragment_with_nested_fragments/kotlin/responseBased/root_query_fragment_with_nested_fragments/TestQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/root_query_fragment_with_nested_fragments/kotlin/responseBased/root_query_fragment_with_nested_fragments/TestQuery.kt.expected index 4b9278130ed..7b1bb97e35d 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/root_query_fragment_with_nested_fragments/kotlin/responseBased/root_query_fragment_with_nested_fragments/TestQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/root_query_fragment_with_nested_fragments/kotlin/responseBased/root_query_fragment_with_nested_fragments/TestQuery.kt.expected @@ -25,6 +25,8 @@ import kotlin.Suppress import com.example.root_query_fragment_with_nested_fragments.type.Query as CompiledQuery public class TestQuery() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/root_query_fragment_with_nested_fragments/kotlin/responseBased/root_query_fragment_with_nested_fragments/fragment/DroidFragmentImpl.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/root_query_fragment_with_nested_fragments/kotlin/responseBased/root_query_fragment_with_nested_fragments/fragment/DroidFragmentImpl.kt.expected index aec7fd5935e..1a7152cd5ad 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/root_query_fragment_with_nested_fragments/kotlin/responseBased/root_query_fragment_with_nested_fragments/fragment/DroidFragmentImpl.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/root_query_fragment_with_nested_fragments/kotlin/responseBased/root_query_fragment_with_nested_fragments/fragment/DroidFragmentImpl.kt.expected @@ -19,6 +19,8 @@ import kotlin.Int import kotlin.String public class DroidFragmentImpl() : Fragment { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/root_query_fragment_with_nested_fragments/kotlin/responseBased/root_query_fragment_with_nested_fragments/fragment/HeroFragmentImpl.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/root_query_fragment_with_nested_fragments/kotlin/responseBased/root_query_fragment_with_nested_fragments/fragment/HeroFragmentImpl.kt.expected index 1e78a6004b6..98191bfb28c 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/root_query_fragment_with_nested_fragments/kotlin/responseBased/root_query_fragment_with_nested_fragments/fragment/HeroFragmentImpl.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/root_query_fragment_with_nested_fragments/kotlin/responseBased/root_query_fragment_with_nested_fragments/fragment/HeroFragmentImpl.kt.expected @@ -19,6 +19,8 @@ import kotlin.Int import kotlin.String public class HeroFragmentImpl() : Fragment { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/root_query_fragment_with_nested_fragments/kotlin/responseBased/root_query_fragment_with_nested_fragments/fragment/QueryFragmentImpl.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/root_query_fragment_with_nested_fragments/kotlin/responseBased/root_query_fragment_with_nested_fragments/fragment/QueryFragmentImpl.kt.expected index ed6d57bf237..13ed85d1a80 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/root_query_fragment_with_nested_fragments/kotlin/responseBased/root_query_fragment_with_nested_fragments/fragment/QueryFragmentImpl.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/root_query_fragment_with_nested_fragments/kotlin/responseBased/root_query_fragment_with_nested_fragments/fragment/QueryFragmentImpl.kt.expected @@ -20,6 +20,8 @@ import kotlin.String import kotlin.Suppress public class QueryFragmentImpl() : Fragment { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/root_query_inline_fragment/java/operationBased/root_query_inline_fragment/TestQuery.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/root_query_inline_fragment/java/operationBased/root_query_inline_fragment/TestQuery.java.expected index 966124ddbe6..d8ebaef7c15 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/root_query_inline_fragment/java/operationBased/root_query_inline_fragment/TestQuery.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/root_query_inline_fragment/java/operationBased/root_query_inline_fragment/TestQuery.java.expected @@ -134,6 +134,11 @@ public class TestQuery implements Query { .build(); } + @Override + public boolean getIgnoreErrors() { + return false; + } + public static final class Builder { Builder() { } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/root_query_inline_fragment/kotlin/operationBased/root_query_inline_fragment/TestQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/root_query_inline_fragment/kotlin/operationBased/root_query_inline_fragment/TestQuery.kt.expected index 2dd2ef54de0..8f4b38be765 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/root_query_inline_fragment/kotlin/operationBased/root_query_inline_fragment/TestQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/root_query_inline_fragment/kotlin/operationBased/root_query_inline_fragment/TestQuery.kt.expected @@ -24,6 +24,8 @@ import kotlin.collections.List import com.example.root_query_inline_fragment.type.Query as CompiledQuery public class TestQuery() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/root_query_inline_fragment/kotlin/responseBased/root_query_inline_fragment/TestQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/root_query_inline_fragment/kotlin/responseBased/root_query_inline_fragment/TestQuery.kt.expected index 6f61b208265..9e4bc5340b3 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/root_query_inline_fragment/kotlin/responseBased/root_query_inline_fragment/TestQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/root_query_inline_fragment/kotlin/responseBased/root_query_inline_fragment/TestQuery.kt.expected @@ -25,6 +25,8 @@ import kotlin.collections.List import com.example.root_query_inline_fragment.type.Query as CompiledQuery public class TestQuery() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/simple_fragment/java/operationBased/simple_fragment/TestQuery.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/simple_fragment/java/operationBased/simple_fragment/TestQuery.java.expected index 713cc2e9780..9bdb1c1ebfc 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/simple_fragment/java/operationBased/simple_fragment/TestQuery.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/simple_fragment/java/operationBased/simple_fragment/TestQuery.java.expected @@ -153,6 +153,11 @@ public class TestQuery implements Query { return buildData(map, new DefaultFakeResolver(__Schema.types)); } + @Override + public boolean getIgnoreErrors() { + return false; + } + public static final class Builder { Builder() { } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/simple_fragment/java/operationBased/simple_fragment/fragment/HeroDetailsImpl.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/simple_fragment/java/operationBased/simple_fragment/fragment/HeroDetailsImpl.java.expected index 00cd8a74a00..f9aa9d59867 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/simple_fragment/java/operationBased/simple_fragment/fragment/HeroDetailsImpl.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/simple_fragment/java/operationBased/simple_fragment/fragment/HeroDetailsImpl.java.expected @@ -83,4 +83,9 @@ public class HeroDetailsImpl implements Fragment { .selections(HeroDetailsSelections.__root) .build(); } + + @Override + public boolean getIgnoreErrors() { + return false; + } } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/simple_fragment/java/operationBased/simple_fragment/fragment/HumanDetailsImpl.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/simple_fragment/java/operationBased/simple_fragment/fragment/HumanDetailsImpl.java.expected index eb2fd730381..4883932d253 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/simple_fragment/java/operationBased/simple_fragment/fragment/HumanDetailsImpl.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/simple_fragment/java/operationBased/simple_fragment/fragment/HumanDetailsImpl.java.expected @@ -82,4 +82,9 @@ public class HumanDetailsImpl implements Fragment { .selections(HumanDetailsSelections.__root) .build(); } + + @Override + public boolean getIgnoreErrors() { + return false; + } } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/simple_fragment/kotlin/operationBased/simple_fragment/TestQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/simple_fragment/kotlin/operationBased/simple_fragment/TestQuery.kt.expected index 7d755d61906..a93b43c121d 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/simple_fragment/kotlin/operationBased/simple_fragment/TestQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/simple_fragment/kotlin/operationBased/simple_fragment/TestQuery.kt.expected @@ -34,6 +34,8 @@ import com.example.simple_fragment.type.Query as CompiledQuery * for both query and fragments */ internal class TestQuery() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/simple_fragment/kotlin/operationBased/simple_fragment/fragment/HeroDetailsImpl.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/simple_fragment/kotlin/operationBased/simple_fragment/fragment/HeroDetailsImpl.kt.expected index b5645ad3bcf..d2debb42a42 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/simple_fragment/kotlin/operationBased/simple_fragment/fragment/HeroDetailsImpl.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/simple_fragment/kotlin/operationBased/simple_fragment/fragment/HeroDetailsImpl.kt.expected @@ -31,6 +31,8 @@ import kotlin.Unit * with multi lines support */ internal class HeroDetailsImpl() : Fragment { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/simple_fragment/kotlin/operationBased/simple_fragment/fragment/HumanDetailsImpl.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/simple_fragment/kotlin/operationBased/simple_fragment/fragment/HumanDetailsImpl.kt.expected index ba64f5e96e0..d55f5260336 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/simple_fragment/kotlin/operationBased/simple_fragment/fragment/HumanDetailsImpl.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/simple_fragment/kotlin/operationBased/simple_fragment/fragment/HumanDetailsImpl.kt.expected @@ -28,6 +28,8 @@ import kotlin.Unit * Fragment with Java / Kotlin docs generation */ internal class HumanDetailsImpl() : Fragment { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/simple_fragment/kotlin/responseBased/simple_fragment/TestQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/simple_fragment/kotlin/responseBased/simple_fragment/TestQuery.kt.expected index 389736e7964..e681c4a5c5b 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/simple_fragment/kotlin/responseBased/simple_fragment/TestQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/simple_fragment/kotlin/responseBased/simple_fragment/TestQuery.kt.expected @@ -36,6 +36,8 @@ import com.example.simple_fragment.type.Query as CompiledQuery * for both query and fragments */ internal class TestQuery() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/simple_fragment/kotlin/responseBased/simple_fragment/fragment/HeroDetailsImpl.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/simple_fragment/kotlin/responseBased/simple_fragment/fragment/HeroDetailsImpl.kt.expected index 2fdb9fd5f98..0e56312583b 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/simple_fragment/kotlin/responseBased/simple_fragment/fragment/HeroDetailsImpl.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/simple_fragment/kotlin/responseBased/simple_fragment/fragment/HeroDetailsImpl.kt.expected @@ -33,6 +33,8 @@ import kotlin.Unit * with multi lines support */ internal class HeroDetailsImpl() : Fragment { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/simple_fragment/kotlin/responseBased/simple_fragment/fragment/HumanDetailsImpl.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/simple_fragment/kotlin/responseBased/simple_fragment/fragment/HumanDetailsImpl.kt.expected index 53ece038bf7..910bd011861 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/simple_fragment/kotlin/responseBased/simple_fragment/fragment/HumanDetailsImpl.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/simple_fragment/kotlin/responseBased/simple_fragment/fragment/HumanDetailsImpl.kt.expected @@ -29,6 +29,8 @@ import kotlin.Unit * Fragment with Java / Kotlin docs generation */ internal class HumanDetailsImpl() : Fragment { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/simple_fragment_with_inline_fragments/java/operationBased/simple_fragment_with_inline_fragments/TestQuery.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/simple_fragment_with_inline_fragments/java/operationBased/simple_fragment_with_inline_fragments/TestQuery.java.expected index 12972d71f1c..43a51b28972 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/simple_fragment_with_inline_fragments/java/operationBased/simple_fragment_with_inline_fragments/TestQuery.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/simple_fragment_with_inline_fragments/java/operationBased/simple_fragment_with_inline_fragments/TestQuery.java.expected @@ -131,6 +131,11 @@ public class TestQuery implements Query { .build(); } + @Override + public boolean getIgnoreErrors() { + return false; + } + public static final class Builder { Builder() { } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/simple_fragment_with_inline_fragments/java/operationBased/simple_fragment_with_inline_fragments/fragment/HeroDetailsImpl.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/simple_fragment_with_inline_fragments/java/operationBased/simple_fragment_with_inline_fragments/fragment/HeroDetailsImpl.java.expected index 8c1484247cd..849e0ffb6d3 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/simple_fragment_with_inline_fragments/java/operationBased/simple_fragment_with_inline_fragments/fragment/HeroDetailsImpl.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/simple_fragment_with_inline_fragments/java/operationBased/simple_fragment_with_inline_fragments/fragment/HeroDetailsImpl.java.expected @@ -79,4 +79,9 @@ public class HeroDetailsImpl implements Fragment { .selections(HeroDetailsSelections.__root) .build(); } + + @Override + public boolean getIgnoreErrors() { + return false; + } } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/simple_fragment_with_inline_fragments/kotlin/operationBased/simple_fragment_with_inline_fragments/TestQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/simple_fragment_with_inline_fragments/kotlin/operationBased/simple_fragment_with_inline_fragments/TestQuery.kt.expected index fcbea772b43..2d650047f24 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/simple_fragment_with_inline_fragments/kotlin/operationBased/simple_fragment_with_inline_fragments/TestQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/simple_fragment_with_inline_fragments/kotlin/operationBased/simple_fragment_with_inline_fragments/TestQuery.kt.expected @@ -22,6 +22,8 @@ import kotlin.String import com.example.simple_fragment_with_inline_fragments.type.Query as CompiledQuery public class TestQuery() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/simple_fragment_with_inline_fragments/kotlin/operationBased/simple_fragment_with_inline_fragments/fragment/HeroDetailsImpl.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/simple_fragment_with_inline_fragments/kotlin/operationBased/simple_fragment_with_inline_fragments/fragment/HeroDetailsImpl.kt.expected index 0d390ba117e..2c5111268f5 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/simple_fragment_with_inline_fragments/kotlin/operationBased/simple_fragment_with_inline_fragments/fragment/HeroDetailsImpl.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/simple_fragment_with_inline_fragments/kotlin/operationBased/simple_fragment_with_inline_fragments/fragment/HeroDetailsImpl.kt.expected @@ -18,6 +18,8 @@ import kotlin.Boolean import kotlin.Int public class HeroDetailsImpl() : Fragment { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/simple_fragment_with_inline_fragments/kotlin/responseBased/simple_fragment_with_inline_fragments/TestQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/simple_fragment_with_inline_fragments/kotlin/responseBased/simple_fragment_with_inline_fragments/TestQuery.kt.expected index f6ea35482a3..e32c97e9d3d 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/simple_fragment_with_inline_fragments/kotlin/responseBased/simple_fragment_with_inline_fragments/TestQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/simple_fragment_with_inline_fragments/kotlin/responseBased/simple_fragment_with_inline_fragments/TestQuery.kt.expected @@ -25,6 +25,8 @@ import kotlin.collections.List import com.example.simple_fragment_with_inline_fragments.type.Query as CompiledQuery public class TestQuery() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/simple_fragment_with_inline_fragments/kotlin/responseBased/simple_fragment_with_inline_fragments/fragment/HeroDetailsImpl.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/simple_fragment_with_inline_fragments/kotlin/responseBased/simple_fragment_with_inline_fragments/fragment/HeroDetailsImpl.kt.expected index f8067b0b377..4130d233c95 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/simple_fragment_with_inline_fragments/kotlin/responseBased/simple_fragment_with_inline_fragments/fragment/HeroDetailsImpl.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/simple_fragment_with_inline_fragments/kotlin/responseBased/simple_fragment_with_inline_fragments/fragment/HeroDetailsImpl.kt.expected @@ -22,6 +22,8 @@ import kotlin.Suppress import kotlin.collections.List public class HeroDetailsImpl() : Fragment { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/simple_inline_fragment/java/operationBased/simple_inline_fragment/TestQuery.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/simple_inline_fragment/java/operationBased/simple_inline_fragment/TestQuery.java.expected index 61c03366379..fe57bcbf16f 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/simple_inline_fragment/java/operationBased/simple_inline_fragment/TestQuery.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/simple_inline_fragment/java/operationBased/simple_inline_fragment/TestQuery.java.expected @@ -129,6 +129,11 @@ public class TestQuery implements Query { .build(); } + @Override + public boolean getIgnoreErrors() { + return false; + } + public static final class Builder { Builder() { } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/simple_inline_fragment/kotlin/operationBased/simple_inline_fragment/TestQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/simple_inline_fragment/kotlin/operationBased/simple_inline_fragment/TestQuery.kt.expected index 3a47fa1f3a8..a1da3f14233 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/simple_inline_fragment/kotlin/operationBased/simple_inline_fragment/TestQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/simple_inline_fragment/kotlin/operationBased/simple_inline_fragment/TestQuery.kt.expected @@ -22,6 +22,8 @@ import kotlin.String import com.example.simple_inline_fragment.type.Query as CompiledQuery public class TestQuery() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/simple_inline_fragment/kotlin/responseBased/simple_inline_fragment/TestQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/simple_inline_fragment/kotlin/responseBased/simple_inline_fragment/TestQuery.kt.expected index fe874d703e8..e78cf814fc7 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/simple_inline_fragment/kotlin/responseBased/simple_inline_fragment/TestQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/simple_inline_fragment/kotlin/responseBased/simple_inline_fragment/TestQuery.kt.expected @@ -23,6 +23,8 @@ import kotlin.Suppress import com.example.simple_inline_fragment.type.Query as CompiledQuery public class TestQuery() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/simple_union/java/operationBased/simple_union/AnimalQuery.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/simple_union/java/operationBased/simple_union/AnimalQuery.java.expected index a232797f18c..c643397f8ab 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/simple_union/java/operationBased/simple_union/AnimalQuery.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/simple_union/java/operationBased/simple_union/AnimalQuery.java.expected @@ -127,6 +127,11 @@ public class AnimalQuery implements Query { .build(); } + @Override + public boolean getIgnoreErrors() { + return false; + } + public static final class Builder { Builder() { } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/simple_union/java/operationBased/simple_union/fragment/CatFragmentImpl.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/simple_union/java/operationBased/simple_union/fragment/CatFragmentImpl.java.expected index 1f9b142df38..cc72a2b6ab8 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/simple_union/java/operationBased/simple_union/fragment/CatFragmentImpl.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/simple_union/java/operationBased/simple_union/fragment/CatFragmentImpl.java.expected @@ -79,4 +79,9 @@ public class CatFragmentImpl implements Fragment { .selections(CatFragmentSelections.__root) .build(); } + + @Override + public boolean getIgnoreErrors() { + return false; + } } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/simple_union/java/operationBased/simple_union/fragment/DogFragmentImpl.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/simple_union/java/operationBased/simple_union/fragment/DogFragmentImpl.java.expected index c068a7632a8..76378a4a5cf 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/simple_union/java/operationBased/simple_union/fragment/DogFragmentImpl.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/simple_union/java/operationBased/simple_union/fragment/DogFragmentImpl.java.expected @@ -79,4 +79,9 @@ public class DogFragmentImpl implements Fragment { .selections(DogFragmentSelections.__root) .build(); } + + @Override + public boolean getIgnoreErrors() { + return false; + } } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/simple_union/kotlin/operationBased/simple_union/AnimalQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/simple_union/kotlin/operationBased/simple_union/AnimalQuery.kt.expected index ef51a55077a..d87782165d5 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/simple_union/kotlin/operationBased/simple_union/AnimalQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/simple_union/kotlin/operationBased/simple_union/AnimalQuery.kt.expected @@ -23,6 +23,8 @@ import kotlin.String import com.example.simple_union.type.Query as CompiledQuery public class AnimalQuery() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/simple_union/kotlin/operationBased/simple_union/fragment/CatFragmentImpl.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/simple_union/kotlin/operationBased/simple_union/fragment/CatFragmentImpl.kt.expected index 93e12455cf0..ab16b2cba00 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/simple_union/kotlin/operationBased/simple_union/fragment/CatFragmentImpl.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/simple_union/kotlin/operationBased/simple_union/fragment/CatFragmentImpl.kt.expected @@ -18,6 +18,8 @@ import kotlin.Boolean import kotlin.Int public class CatFragmentImpl() : Fragment { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/simple_union/kotlin/operationBased/simple_union/fragment/DogFragmentImpl.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/simple_union/kotlin/operationBased/simple_union/fragment/DogFragmentImpl.kt.expected index 08a29ec470c..0ef2421abd1 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/simple_union/kotlin/operationBased/simple_union/fragment/DogFragmentImpl.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/simple_union/kotlin/operationBased/simple_union/fragment/DogFragmentImpl.kt.expected @@ -18,6 +18,8 @@ import kotlin.Boolean import kotlin.Int public class DogFragmentImpl() : Fragment { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/simple_union/kotlin/responseBased/simple_union/AnimalQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/simple_union/kotlin/responseBased/simple_union/AnimalQuery.kt.expected index 1f30e357d72..b21bff966a6 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/simple_union/kotlin/responseBased/simple_union/AnimalQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/simple_union/kotlin/responseBased/simple_union/AnimalQuery.kt.expected @@ -24,6 +24,8 @@ import kotlin.Suppress import com.example.simple_union.type.Query as CompiledQuery public class AnimalQuery() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/simple_union/kotlin/responseBased/simple_union/fragment/CatFragmentImpl.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/simple_union/kotlin/responseBased/simple_union/fragment/CatFragmentImpl.kt.expected index a9269a3b30b..cb5d58d07d1 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/simple_union/kotlin/responseBased/simple_union/fragment/CatFragmentImpl.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/simple_union/kotlin/responseBased/simple_union/fragment/CatFragmentImpl.kt.expected @@ -19,6 +19,8 @@ import kotlin.Int import kotlin.String public class CatFragmentImpl() : Fragment { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/simple_union/kotlin/responseBased/simple_union/fragment/DogFragmentImpl.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/simple_union/kotlin/responseBased/simple_union/fragment/DogFragmentImpl.kt.expected index 74c772bdf84..7d1b8c9273f 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/simple_union/kotlin/responseBased/simple_union/fragment/DogFragmentImpl.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/simple_union/kotlin/responseBased/simple_union/fragment/DogFragmentImpl.kt.expected @@ -19,6 +19,8 @@ import kotlin.Int import kotlin.String public class DogFragmentImpl() : Fragment { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/starships/java/operationBased/starships/TestQuery.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/starships/java/operationBased/starships/TestQuery.java.expected index 27882da1a21..1a38382d812 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/starships/java/operationBased/starships/TestQuery.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/starships/java/operationBased/starships/TestQuery.java.expected @@ -126,6 +126,11 @@ public class TestQuery implements Query { .build(); } + @Override + public boolean getIgnoreErrors() { + return false; + } + public static final class Builder { private String id; diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/starships/kotlin/responseBased/starships/TestQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/starships/kotlin/responseBased/starships/TestQuery.kt.expected index c8cbccc3054..f284e10402f 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/starships/kotlin/responseBased/starships/TestQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/starships/kotlin/responseBased/starships/TestQuery.kt.expected @@ -24,6 +24,8 @@ import com.example.starships.type.Query as CompiledQuery public data class TestQuery( public val id: String, ) : Query { + override val ignoreErrors: Boolean = false + override fun id(): String = OPERATION_ID override fun document(): String = OPERATION_DOCUMENT diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/subscriptions/java/operationBased/subscriptions/TestSubscription.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/subscriptions/java/operationBased/subscriptions/TestSubscription.java.expected index 977e79da322..e33b7cda565 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/subscriptions/java/operationBased/subscriptions/TestSubscription.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/subscriptions/java/operationBased/subscriptions/TestSubscription.java.expected @@ -124,6 +124,11 @@ public class TestSubscription implements Subscription { .build(); } + @Override + public boolean getIgnoreErrors() { + return false; + } + public static final class Builder { private String repo; diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/subscriptions/kotlin/responseBased/subscriptions/TestSubscription.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/subscriptions/kotlin/responseBased/subscriptions/TestSubscription.kt.expected index a5bcf6f92ba..41e69093ee4 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/subscriptions/kotlin/responseBased/subscriptions/TestSubscription.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/subscriptions/kotlin/responseBased/subscriptions/TestSubscription.kt.expected @@ -23,6 +23,8 @@ import com.example.subscriptions.type.Subscription as CompiledSubscription public data class TestSubscription( public val repo: String, ) : Subscription { + override val ignoreErrors: Boolean = false + override fun id(): String = OPERATION_ID override fun document(): String = OPERATION_DOCUMENT diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/suppressed_warnings/java/operationBased/suppressed_warnings/CatQuery.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/suppressed_warnings/java/operationBased/suppressed_warnings/CatQuery.java.expected index 5e79490327a..c2cdef72b88 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/suppressed_warnings/java/operationBased/suppressed_warnings/CatQuery.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/suppressed_warnings/java/operationBased/suppressed_warnings/CatQuery.java.expected @@ -127,6 +127,11 @@ public class CatQuery implements Query { .build(); } + @Override + public boolean getIgnoreErrors() { + return false; + } + public static final class Builder { private Optional filter = Optional.absent(); diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/suppressed_warnings/kotlin/responseBased/suppressed_warnings/CatQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/suppressed_warnings/kotlin/responseBased/suppressed_warnings/CatQuery.kt.expected index 8f40c3b5427..0735570dd2d 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/suppressed_warnings/kotlin/responseBased/suppressed_warnings/CatQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/suppressed_warnings/kotlin/responseBased/suppressed_warnings/CatQuery.kt.expected @@ -26,6 +26,8 @@ import com.example.suppressed_warnings.type.Query as CompiledQuery public data class CatQuery( public val filter: Optional = Optional.Absent, ) : Query { + override val ignoreErrors: Boolean = false + override fun id(): String = OPERATION_ID override fun document(): String = OPERATION_DOCUMENT diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/target_name/java/operationBased/target_name/TestQuery.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/target_name/java/operationBased/target_name/TestQuery.java.expected index 293fe1ebb30..8d29b005e45 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/target_name/java/operationBased/target_name/TestQuery.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/target_name/java/operationBased/target_name/TestQuery.java.expected @@ -150,6 +150,11 @@ public class TestQuery implements Query { .build(); } + @Override + public boolean getIgnoreErrors() { + return false; + } + public static final class Builder { private Optional input = Optional.absent(); diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/target_name/kotlin/operationBased/target_name/TestQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/target_name/kotlin/operationBased/target_name/TestQuery.kt.expected index 60b6ca7d18c..895db3e513c 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/target_name/kotlin/operationBased/target_name/TestQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/target_name/kotlin/operationBased/target_name/TestQuery.kt.expected @@ -28,6 +28,8 @@ public data class TestQuery( public val scalar: Optional = Optional.Absent, public val `enum`: Optional = Optional.Absent, ) : Query { + override val ignoreErrors: Boolean = false + override fun id(): String = OPERATION_ID override fun document(): String = OPERATION_DOCUMENT diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/target_name/kotlin/responseBased/target_name/TestQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/target_name/kotlin/responseBased/target_name/TestQuery.kt.expected index 34eb26f1233..385de5b155b 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/target_name/kotlin/responseBased/target_name/TestQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/target_name/kotlin/responseBased/target_name/TestQuery.kt.expected @@ -29,6 +29,8 @@ public data class TestQuery( public val scalar: Optional = Optional.Absent, public val `enum`: Optional = Optional.Absent, ) : Query { + override val ignoreErrors: Boolean = false + override fun id(): String = OPERATION_ID override fun document(): String = OPERATION_DOCUMENT diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/test_inline/java/operationBased/test_inline/GetPage.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/test_inline/java/operationBased/test_inline/GetPage.java.expected index d4179b8b25c..1be56719916 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/test_inline/java/operationBased/test_inline/GetPage.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/test_inline/java/operationBased/test_inline/GetPage.java.expected @@ -127,6 +127,11 @@ public class GetPage implements Query { .build(); } + @Override + public boolean getIgnoreErrors() { + return false; + } + public static final class Builder { Builder() { } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/test_inline/kotlin/operationBased/test_inline/GetPage.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/test_inline/kotlin/operationBased/test_inline/GetPage.kt.expected index 2338383bc9f..bd961e24f2c 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/test_inline/kotlin/operationBased/test_inline/GetPage.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/test_inline/kotlin/operationBased/test_inline/GetPage.kt.expected @@ -22,6 +22,8 @@ import kotlin.collections.List import com.example.test_inline.type.Query as CompiledQuery public class GetPage() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/test_inline/kotlin/responseBased/test_inline/GetPage.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/test_inline/kotlin/responseBased/test_inline/GetPage.kt.expected index c5ab75dc963..c968a00d8b3 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/test_inline/kotlin/responseBased/test_inline/GetPage.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/test_inline/kotlin/responseBased/test_inline/GetPage.kt.expected @@ -23,6 +23,8 @@ import kotlin.collections.List import com.example.test_inline.type.Query as CompiledQuery public class GetPage() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/two_heroes_unique/java/operationBased/two_heroes_unique/TestQuery.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/two_heroes_unique/java/operationBased/two_heroes_unique/TestQuery.java.expected index dba648f5ecf..8965187339f 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/two_heroes_unique/java/operationBased/two_heroes_unique/TestQuery.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/two_heroes_unique/java/operationBased/two_heroes_unique/TestQuery.java.expected @@ -119,6 +119,11 @@ public class TestQuery implements Query { .build(); } + @Override + public boolean getIgnoreErrors() { + return false; + } + public static final class Builder { Builder() { } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/two_heroes_unique/kotlin/responseBased/two_heroes_unique/TestQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/two_heroes_unique/kotlin/responseBased/two_heroes_unique/TestQuery.kt.expected index b32c9e39ac0..29fbd77d741 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/two_heroes_unique/kotlin/responseBased/two_heroes_unique/TestQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/two_heroes_unique/kotlin/responseBased/two_heroes_unique/TestQuery.kt.expected @@ -21,6 +21,8 @@ import kotlin.String import com.example.two_heroes_unique.type.Query as CompiledQuery public class TestQuery() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/two_heroes_with_friends/java/operationBased/two_heroes_with_friends/TestQuery.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/two_heroes_with_friends/java/operationBased/two_heroes_with_friends/TestQuery.java.expected index a10097df269..d15184c3bba 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/two_heroes_with_friends/java/operationBased/two_heroes_with_friends/TestQuery.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/two_heroes_with_friends/java/operationBased/two_heroes_with_friends/TestQuery.java.expected @@ -137,6 +137,11 @@ public class TestQuery implements Query { .build(); } + @Override + public boolean getIgnoreErrors() { + return false; + } + public static final class Builder { Builder() { } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/two_heroes_with_friends/kotlin/responseBased/two_heroes_with_friends/TestQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/two_heroes_with_friends/kotlin/responseBased/two_heroes_with_friends/TestQuery.kt.expected index 5d044c5a8ed..0ee13bd1bae 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/two_heroes_with_friends/kotlin/responseBased/two_heroes_with_friends/TestQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/two_heroes_with_friends/kotlin/responseBased/two_heroes_with_friends/TestQuery.kt.expected @@ -22,6 +22,8 @@ import kotlin.collections.List import com.example.two_heroes_with_friends.type.Query as CompiledQuery public class TestQuery() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/typename_always_first/java/operationBased/typename_always_first/TestQuery.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/typename_always_first/java/operationBased/typename_always_first/TestQuery.java.expected index cae9dd694af..0fa7ee64e04 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/typename_always_first/java/operationBased/typename_always_first/TestQuery.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/typename_always_first/java/operationBased/typename_always_first/TestQuery.java.expected @@ -126,6 +126,11 @@ public class TestQuery implements Query { .build(); } + @Override + public boolean getIgnoreErrors() { + return false; + } + public static final class Builder { Builder() { } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/typename_always_first/kotlin/operationBased/typename_always_first/TestQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/typename_always_first/kotlin/operationBased/typename_always_first/TestQuery.kt.expected index b45b2519083..88587fc48b9 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/typename_always_first/kotlin/operationBased/typename_always_first/TestQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/typename_always_first/kotlin/operationBased/typename_always_first/TestQuery.kt.expected @@ -22,6 +22,8 @@ import kotlin.String import com.example.typename_always_first.type.Query as CompiledQuery public class TestQuery() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/typename_always_first/kotlin/responseBased/typename_always_first/TestQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/typename_always_first/kotlin/responseBased/typename_always_first/TestQuery.kt.expected index cadb16af56d..029bd0704c4 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/typename_always_first/kotlin/responseBased/typename_always_first/TestQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/typename_always_first/kotlin/responseBased/typename_always_first/TestQuery.kt.expected @@ -23,6 +23,8 @@ import kotlin.Suppress import com.example.typename_always_first.type.Query as CompiledQuery public class TestQuery() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/union_fragment/java/operationBased/union_fragment/TestQuery.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/union_fragment/java/operationBased/union_fragment/TestQuery.java.expected index e364d52dc16..9b17f72c339 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/union_fragment/java/operationBased/union_fragment/TestQuery.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/union_fragment/java/operationBased/union_fragment/TestQuery.java.expected @@ -125,6 +125,11 @@ public class TestQuery implements Query { .build(); } + @Override + public boolean getIgnoreErrors() { + return false; + } + public static final class Builder { Builder() { } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/union_fragment/java/operationBased/union_fragment/fragment/StarshipImpl.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/union_fragment/java/operationBased/union_fragment/fragment/StarshipImpl.java.expected index a9caff658a8..5facb170b84 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/union_fragment/java/operationBased/union_fragment/fragment/StarshipImpl.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/union_fragment/java/operationBased/union_fragment/fragment/StarshipImpl.java.expected @@ -78,4 +78,9 @@ public class StarshipImpl implements Fragment { .selections(StarshipSelections.__root) .build(); } + + @Override + public boolean getIgnoreErrors() { + return false; + } } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/union_fragment/kotlin/operationBased/union_fragment/TestQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/union_fragment/kotlin/operationBased/union_fragment/TestQuery.kt.expected index 29b30a97c2c..74c246bbf85 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/union_fragment/kotlin/operationBased/union_fragment/TestQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/union_fragment/kotlin/operationBased/union_fragment/TestQuery.kt.expected @@ -23,6 +23,8 @@ import kotlin.collections.List import com.example.union_fragment.type.Query as CompiledQuery public class TestQuery() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/union_fragment/kotlin/operationBased/union_fragment/fragment/StarshipImpl.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/union_fragment/kotlin/operationBased/union_fragment/fragment/StarshipImpl.kt.expected index 76bc13138b9..04ad6bb4c39 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/union_fragment/kotlin/operationBased/union_fragment/fragment/StarshipImpl.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/union_fragment/kotlin/operationBased/union_fragment/fragment/StarshipImpl.kt.expected @@ -17,6 +17,8 @@ import kotlin.Boolean import kotlin.Int public class StarshipImpl() : Fragment { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/union_fragment/kotlin/responseBased/union_fragment/TestQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/union_fragment/kotlin/responseBased/union_fragment/TestQuery.kt.expected index ab63c7adf7d..c1d9131512b 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/union_fragment/kotlin/responseBased/union_fragment/TestQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/union_fragment/kotlin/responseBased/union_fragment/TestQuery.kt.expected @@ -24,6 +24,8 @@ import kotlin.collections.List import com.example.union_fragment.type.Query as CompiledQuery public class TestQuery() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/union_fragment/kotlin/responseBased/union_fragment/fragment/StarshipImpl.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/union_fragment/kotlin/responseBased/union_fragment/fragment/StarshipImpl.kt.expected index 340143b19f2..079186ed9e1 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/union_fragment/kotlin/responseBased/union_fragment/fragment/StarshipImpl.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/union_fragment/kotlin/responseBased/union_fragment/fragment/StarshipImpl.kt.expected @@ -18,6 +18,8 @@ import kotlin.Int import kotlin.String public class StarshipImpl() : Fragment { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/union_inline_fragments/java/operationBased/union_inline_fragments/TestQuery.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/union_inline_fragments/java/operationBased/union_inline_fragments/TestQuery.java.expected index c5be5f82ac7..5ad27df864e 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/union_inline_fragments/java/operationBased/union_inline_fragments/TestQuery.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/union_inline_fragments/java/operationBased/union_inline_fragments/TestQuery.java.expected @@ -145,6 +145,11 @@ public class TestQuery implements Query { .build(); } + @Override + public boolean getIgnoreErrors() { + return false; + } + public static final class Builder { Builder() { } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/union_inline_fragments/kotlin/operationBased/union_inline_fragments/TestQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/union_inline_fragments/kotlin/operationBased/union_inline_fragments/TestQuery.kt.expected index e261c65714f..b6b666c92a5 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/union_inline_fragments/kotlin/operationBased/union_inline_fragments/TestQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/union_inline_fragments/kotlin/operationBased/union_inline_fragments/TestQuery.kt.expected @@ -23,6 +23,8 @@ import kotlin.collections.List import com.example.union_inline_fragments.type.Query as CompiledQuery public class TestQuery() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/union_inline_fragments/kotlin/responseBased/union_inline_fragments/TestQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/union_inline_fragments/kotlin/responseBased/union_inline_fragments/TestQuery.kt.expected index 1a9d14aa418..ae51cd5ca4f 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/union_inline_fragments/kotlin/responseBased/union_inline_fragments/TestQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/union_inline_fragments/kotlin/responseBased/union_inline_fragments/TestQuery.kt.expected @@ -24,6 +24,8 @@ import kotlin.collections.List import com.example.union_inline_fragments.type.Query as CompiledQuery public class TestQuery() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/unique_type_name/java/operationBased/unique_type_name/HeroDetailQuery.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/unique_type_name/java/operationBased/unique_type_name/HeroDetailQuery.java.expected index af5a75ee75b..9326f23a3fc 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/unique_type_name/java/operationBased/unique_type_name/HeroDetailQuery.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/unique_type_name/java/operationBased/unique_type_name/HeroDetailQuery.java.expected @@ -145,6 +145,11 @@ public class HeroDetailQuery implements Query { .build(); } + @Override + public boolean getIgnoreErrors() { + return false; + } + public static final class Builder { Builder() { } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/unique_type_name/java/operationBased/unique_type_name/fragment/HeroDetailsImpl.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/unique_type_name/java/operationBased/unique_type_name/fragment/HeroDetailsImpl.java.expected index aaa187103ea..18182180663 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/unique_type_name/java/operationBased/unique_type_name/fragment/HeroDetailsImpl.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/unique_type_name/java/operationBased/unique_type_name/fragment/HeroDetailsImpl.java.expected @@ -79,4 +79,9 @@ public class HeroDetailsImpl implements Fragment { .selections(HeroDetailsSelections.__root) .build(); } + + @Override + public boolean getIgnoreErrors() { + return false; + } } diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/unique_type_name/kotlin/operationBased/unique_type_name/HeroDetailQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/unique_type_name/kotlin/operationBased/unique_type_name/HeroDetailQuery.kt.expected index 265286121ba..cee9481b067 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/unique_type_name/kotlin/operationBased/unique_type_name/HeroDetailQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/unique_type_name/kotlin/operationBased/unique_type_name/HeroDetailQuery.kt.expected @@ -25,6 +25,8 @@ import kotlin.collections.List import com.example.unique_type_name.type.Query as CompiledQuery public class HeroDetailQuery() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/unique_type_name/kotlin/operationBased/unique_type_name/fragment/HeroDetailsImpl.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/unique_type_name/kotlin/operationBased/unique_type_name/fragment/HeroDetailsImpl.kt.expected index c22e36defb5..b9ef0af5229 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/unique_type_name/kotlin/operationBased/unique_type_name/fragment/HeroDetailsImpl.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/unique_type_name/kotlin/operationBased/unique_type_name/fragment/HeroDetailsImpl.kt.expected @@ -18,6 +18,8 @@ import kotlin.Boolean import kotlin.Int public class HeroDetailsImpl() : Fragment { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/unique_type_name/kotlin/responseBased/unique_type_name/HeroDetailQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/unique_type_name/kotlin/responseBased/unique_type_name/HeroDetailQuery.kt.expected index 9eb93dad4ec..53df24336a8 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/unique_type_name/kotlin/responseBased/unique_type_name/HeroDetailQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/unique_type_name/kotlin/responseBased/unique_type_name/HeroDetailQuery.kt.expected @@ -26,6 +26,8 @@ import kotlin.collections.List import com.example.unique_type_name.type.Query as CompiledQuery public class HeroDetailQuery() : Query { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/unique_type_name/kotlin/responseBased/unique_type_name/fragment/HeroDetailsImpl.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/unique_type_name/kotlin/responseBased/unique_type_name/fragment/HeroDetailsImpl.kt.expected index 6a98a22cec4..5eb8bee38b0 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/unique_type_name/kotlin/responseBased/unique_type_name/fragment/HeroDetailsImpl.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/unique_type_name/kotlin/responseBased/unique_type_name/fragment/HeroDetailsImpl.kt.expected @@ -20,6 +20,8 @@ import kotlin.String import kotlin.collections.List public class HeroDetailsImpl() : Fragment { + override val ignoreErrors: Boolean = false + override fun equals(other: Any?): Boolean = other != null && other::class == this::class override fun hashCode(): Int = this::class.hashCode() diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/variable_default_value/java/operationBased/variable_default_value/TestQuery.java.expected b/libraries/apollo-compiler/src/test/graphql/com/example/variable_default_value/java/operationBased/variable_default_value/TestQuery.java.expected index 1a40455f2e6..1706ff21d4c 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/variable_default_value/java/operationBased/variable_default_value/TestQuery.java.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/variable_default_value/java/operationBased/variable_default_value/TestQuery.java.expected @@ -124,6 +124,11 @@ public class TestQuery implements Query { .build(); } + @Override + public boolean getIgnoreErrors() { + return false; + } + public static final class Builder { private Optional episode = Optional.absent(); diff --git a/libraries/apollo-compiler/src/test/graphql/com/example/variable_default_value/kotlin/responseBased/variable_default_value/TestQuery.kt.expected b/libraries/apollo-compiler/src/test/graphql/com/example/variable_default_value/kotlin/responseBased/variable_default_value/TestQuery.kt.expected index 00591eb83f7..3b52dd4ac91 100644 --- a/libraries/apollo-compiler/src/test/graphql/com/example/variable_default_value/kotlin/responseBased/variable_default_value/TestQuery.kt.expected +++ b/libraries/apollo-compiler/src/test/graphql/com/example/variable_default_value/kotlin/responseBased/variable_default_value/TestQuery.kt.expected @@ -25,6 +25,8 @@ import com.example.variable_default_value.type.Query as CompiledQuery public data class TestQuery @JvmOverloads constructor( public val episode: Optional = Optional.Absent, ) : Query { + override val ignoreErrors: Boolean = false + override fun id(): String = OPERATION_ID override fun document(): String = OPERATION_DOCUMENT diff --git a/libraries/apollo-compiler/src/test/kotlin/com/apollographql/apollo3/compiler/TestUtils.kt b/libraries/apollo-compiler/src/test/kotlin/com/apollographql/apollo3/compiler/TestUtils.kt index 6c9a7a7101f..5da6a39c59f 100644 --- a/libraries/apollo-compiler/src/test/kotlin/com/apollographql/apollo3/compiler/TestUtils.kt +++ b/libraries/apollo-compiler/src/test/kotlin/com/apollographql/apollo3/compiler/TestUtils.kt @@ -18,10 +18,7 @@ internal object TestUtils { return true } - return when (System.getProperty("updateTestFixtures")?.trim()) { - "on", "true", "1" -> true - else -> false - } + return false } internal fun shouldUpdateMeasurements(): Boolean { return shouldUpdateTestFixtures() @@ -49,10 +46,11 @@ internal object TestUtils { * ./gradlew :apollo-compiler:test -testFilter="fragments_with_type_condition" --tests '*Codegen*' */ fun testFilterMatches(value: String): Boolean { - val testFilter = System.getenv("testFilter") ?: System.getProperty("testFilter") ?: return true + val testFilter = System.getenv("testFilter") ?: return true return Regex(testFilter).containsMatchIn(value) } + fun testParametersForGraphQLFilesIn(path: String): Collection> { return File(path) .walk() diff --git a/libraries/apollo-compiler/src/test/validation/operation/catch/catch.expected b/libraries/apollo-compiler/src/test/validation/operation/catch/catch.expected new file mode 100644 index 00000000000..10c6af4de40 --- /dev/null +++ b/libraries/apollo-compiler/src/test/validation/operation/catch/catch.expected @@ -0,0 +1,17 @@ +OtherValidationIssue (2:5) +`foo` cannot be merged with `foo` (at catch.graphql: (3, 5)): they have different `@catch` directives. Use different aliases on the fields to fetch both if this was intentional. +------------ +OtherValidationIssue (3:5) +`foo` cannot be merged with `foo` (at catch.graphql: (2, 5)): they have different `@catch` directives. Use different aliases on the fields to fetch both if this was intentional. +------------ +OtherValidationIssue (7:9) +Conflicting `@catch` usages for level 'null': a given list level must have a single CatchTo value +------------ +OtherValidationIssue (11:9) +Conflicting `@catch` usages for level '1': a given list level must have a single CatchTo value +------------ +OtherValidationIssue (15:9) +Conflicting `@catch` usages for level '1': this level conflicts with the default 'null' level +------------ +OtherValidationIssue (19:9) +Invalid 'level' value '3' for `@catch` usage: this type has a max list level of 2 \ No newline at end of file diff --git a/libraries/apollo-compiler/src/test/validation/operation/catch/catch.graphql b/libraries/apollo-compiler/src/test/validation/operation/catch/catch.graphql new file mode 100644 index 00000000000..fa2ea69b602 --- /dev/null +++ b/libraries/apollo-compiler/src/test/validation/operation/catch/catch.graphql @@ -0,0 +1,25 @@ +query Query1 { + foo + foo @catch(to: THROW) +} + +query Query2 { + foo @catch(to: THROW) @catch(to: NULL) +} + +query Query3 { + foo @catch(level: 1, to: THROW) @catch(level: 1, to: NULL) +} + +query Query4 { + foo @catch(level: 1, to: THROW) @catch(to: NULL) +} + +query Query5 { + foo @catch(level: 3, to: THROW) +} + +# OK +query Query6 { + foo @catch(level: 1, to: THROW) @catch(level: 2, to: NULL) +} diff --git a/libraries/apollo-compiler/src/test/validation/operation/catch/schema.graphqls b/libraries/apollo-compiler/src/test/validation/operation/catch/schema.graphqls new file mode 100644 index 00000000000..2a4e5896c36 --- /dev/null +++ b/libraries/apollo-compiler/src/test/validation/operation/catch/schema.graphqls @@ -0,0 +1,8 @@ +extend schema @link(url: "https://specs.apollo.dev/nullability/v0.1", import: ["@semanticNonNull", "@catch", "CatchTo"]) + +extend schema @catch(to: THROW) + +type Query { + foo: [[Int]] +} + diff --git a/tests/browser-tests/src/commonTest/kotlin/test/HeadersTest.kt b/tests/browser-tests/src/commonTest/kotlin/test/HeadersTest.kt index e97599665bf..2f7be72e25e 100644 --- a/tests/browser-tests/src/commonTest/kotlin/test/HeadersTest.kt +++ b/tests/browser-tests/src/commonTest/kotlin/test/HeadersTest.kt @@ -1,8 +1,8 @@ package test import com.apollographql.apollo3.ApolloClient -import com.apollographql.apollo3.api.CompiledField import com.apollographql.apollo3.api.Adapter +import com.apollographql.apollo3.api.CompiledField import com.apollographql.apollo3.api.CustomScalarAdapters import com.apollographql.apollo3.api.Subscription import com.apollographql.apollo3.api.json.JsonWriter @@ -57,4 +57,7 @@ class NothingSubscription : Subscription { override fun rootField(): CompiledField { TODO("Not yet implemented") } + + override val ignoreErrors: Boolean + get() = false } diff --git a/tests/catch/build.gradle.kts b/tests/catch/build.gradle.kts new file mode 100644 index 00000000000..4a556a57d7d --- /dev/null +++ b/tests/catch/build.gradle.kts @@ -0,0 +1,32 @@ +plugins { + id("org.jetbrains.kotlin.jvm") + id("com.apollographql.apollo3") +} + +apolloTest() + +dependencies { + implementation(libs.apollo.api) + implementation(libs.apollo.testingsupport) + testImplementation(libs.kotlin.test) + testImplementation(libs.junit) + testImplementation(libs.okhttp) +} + +apollo { + service("throw") { + srcDir("src/main/graphql/shared") + srcDir("src/main/graphql/throw") + packageName.set("throw") + } + service("null") { + srcDir("src/main/graphql/shared") + srcDir("src/main/graphql/null") + packageName.set("null") + } + service("result") { + srcDir("src/main/graphql/shared") + srcDir("src/main/graphql/result") + packageName.set("result") + } +} diff --git a/tests/catch/src/main/graphql/null/extra.graphqls b/tests/catch/src/main/graphql/null/extra.graphqls new file mode 100644 index 00000000000..f6bc88f6d5f --- /dev/null +++ b/tests/catch/src/main/graphql/null/extra.graphqls @@ -0,0 +1 @@ +extend schema @catch(to: NULL) \ No newline at end of file diff --git a/tests/catch/src/main/graphql/null/operations.graphql b/tests/catch/src/main/graphql/null/operations.graphql new file mode 100644 index 00000000000..baa65abd371 --- /dev/null +++ b/tests/catch/src/main/graphql/null/operations.graphql @@ -0,0 +1,10 @@ +query ProductThrow { + product @catch(to: THROW) { + price @catch(to: THROW) + } +} + +query NullAndNonNull { + nonNull + nullable +} diff --git a/tests/catch/src/main/graphql/result/extra.graphqls b/tests/catch/src/main/graphql/result/extra.graphqls new file mode 100644 index 00000000000..9b59eabae86 --- /dev/null +++ b/tests/catch/src/main/graphql/result/extra.graphqls @@ -0,0 +1 @@ +extend schema @catch(to: RESULT) \ No newline at end of file diff --git a/tests/catch/src/main/graphql/shared/operations.graphql b/tests/catch/src/main/graphql/shared/operations.graphql new file mode 100644 index 00000000000..6de2c4ab9e7 --- /dev/null +++ b/tests/catch/src/main/graphql/shared/operations.graphql @@ -0,0 +1,48 @@ +query User { + user { + name + } +} + +query UserResult { + user @catch(to: RESULT) { + name + } +} + +query UserNull { + user @catch(to: NULL) { + name + } +} + +query Product { + product { + price + } +} + +query ProductResult { + product @catch(to: RESULT) { + price + } +} + +query ProductNull { + product @catch(to: NULL) { + price + } +} + +query ProductIgnoreErrors @ignoreErrors { + product { + price + } +} + +query PriceNull { + product { + price @catch(to: NULL) + } +} + diff --git a/tests/catch/src/main/graphql/shared/schema.graphqls b/tests/catch/src/main/graphql/shared/schema.graphqls new file mode 100644 index 00000000000..0c6d8ec7665 --- /dev/null +++ b/tests/catch/src/main/graphql/shared/schema.graphqls @@ -0,0 +1,20 @@ +extend schema @link(url: "https://specs.apollo.dev/nullability/v0.1", import: ["@semanticNonNull", "@catch", "CatchTo"]) + +type Query { + nullable: Int + nonNull: Int! + semanticNonNull: Int @semanticNonNull + deep: [[[Int]]] @semanticNonNull + user: User @semanticNonNull + product: Product +} + +type User { + name: String @semanticNonNull + friends: [User] @semanticNonNull +} + + +type Product { + price: String +} \ No newline at end of file diff --git a/tests/catch/src/main/graphql/throw/extra.graphqls b/tests/catch/src/main/graphql/throw/extra.graphqls new file mode 100644 index 00000000000..2655c348258 --- /dev/null +++ b/tests/catch/src/main/graphql/throw/extra.graphqls @@ -0,0 +1 @@ +extend schema @catch(to: THROW) \ No newline at end of file diff --git a/tests/catch/src/test/kotlin/test/CatchNullTest.kt b/tests/catch/src/test/kotlin/test/CatchNullTest.kt new file mode 100644 index 00000000000..9f64d98a19a --- /dev/null +++ b/tests/catch/src/test/kotlin/test/CatchNullTest.kt @@ -0,0 +1,123 @@ +package test + +import com.apollographql.apollo3.api.getOrNull +import com.apollographql.apollo3.api.getOrThrow +import com.apollographql.apollo3.exception.ApolloGraphQLException +import `null`.PriceNullQuery +import `null`.ProductIgnoreErrorsQuery +import `null`.ProductNullQuery +import `null`.ProductQuery +import `null`.ProductResultQuery +import `null`.ProductThrowQuery +import `null`.UserNullQuery +import `null`.UserQuery +import `null`.UserResultQuery +import kotlin.test.Test +import kotlin.test.assertEquals +import kotlin.test.assertIs +import kotlin.test.assertNotNull +import kotlin.test.assertNull + +class CatchNullTest { + @Test + fun userOnUserNameError() { + val response = UserQuery().parseResponse(userNameError) + val exception = response.exception + assertIs(exception) + assertEquals("cannot resolve name", exception.error.message) + } + + @Test + fun userResultOnUserNameError() { + val response = UserResultQuery().parseResponse(userNameError) + + assertNull(response.data?.user?.getOrNull()?.name) + } + + @Test + fun userNullOnUserNameError() { + val response = UserNullQuery().parseResponse(userNameError) + + assertNull(response.data!!.user?.name) + } + + @Test + fun userOnUserSuccess() { + val response = UserQuery().parseResponse(userSuccess) + + assertEquals("Pancakes", response.data!!.user?.name) + } + + @Test + fun userResultOnUserSuccess() { + val response = UserResultQuery().parseResponse(userSuccess) + + assertEquals("Pancakes", response.data!!.user.getOrThrow().name) + } + + @Test + fun userNullOnUserSuccess() { + val response = UserNullQuery().parseResponse(userSuccess) + + assertEquals("Pancakes", response.data!!.user!!.name) + } + + @Test + fun productOnProductPriceError() { + val response = ProductQuery().parseResponse(productPriceError) + + assertNotNull(response.data) + val exception = response.exception + assertIs(exception) + assertEquals("cannot resolve price", exception.error.message) + } + + @Test + fun productThrowOnProductPriceError() { + val response = ProductThrowQuery().parseResponse(productPriceError) + + assertNull(response.data) + } + + @Test + fun productResultOnProductPriceError() { + val response = ProductResultQuery().parseResponse(productPriceError) + + assertNull(null, response.data?.product?.getOrNull()?.price) + } + + @Test + fun productNullOnProductPriceError() { + val response = ProductNullQuery().parseResponse(productPriceError) + + assertNull(response.data?.product?.price) + assertNotNull(response.data) + } + + @Test + fun productIgnoreErrorsOnProductPriceError() { + val response = ProductIgnoreErrorsQuery().parseResponse(productPriceError) + + assertNotNull(response.data?.product) + assertNull(response.data?.product?.price) + assertEquals("cannot resolve price", response.errors?.single()?.message) + } + + @Test + fun productPriceNullOnProductPriceError() { + val response = PriceNullQuery().parseResponse(productPriceError) + + assertNotNull(response.data?.product) + assertNull(response.data?.product?.price) + assertEquals("cannot resolve price", response.errors?.single()?.message) + } + + @Test + fun productPriceNullOnProductPriceNull() { + val response = PriceNullQuery().parseResponse(productPriceNull) + + assertNotNull(response.data?.product) + assertNull(response.data?.product?.price) + assertNull(response.errors) + } +} diff --git a/tests/catch/src/test/kotlin/test/CatchResultTest.kt b/tests/catch/src/test/kotlin/test/CatchResultTest.kt new file mode 100644 index 00000000000..14d7231b5bc --- /dev/null +++ b/tests/catch/src/test/kotlin/test/CatchResultTest.kt @@ -0,0 +1,115 @@ +package test + +import com.apollographql.apollo3.api.graphQLErrorOrNull +import com.apollographql.apollo3.api.getOrNull +import com.apollographql.apollo3.api.getOrThrow +import com.apollographql.apollo3.exception.ApolloGraphQLException +import result.PriceNullQuery +import result.ProductIgnoreErrorsQuery +import result.ProductNullQuery +import result.ProductQuery +import result.ProductResultQuery +import result.UserNullQuery +import result.UserQuery +import result.UserResultQuery +import kotlin.test.Test +import kotlin.test.assertEquals +import kotlin.test.assertIs +import kotlin.test.assertNotNull +import kotlin.test.assertNull + +class CatchResultTest { + @Test + fun userOnUserNameError() { + val response = UserQuery().parseResponse(userNameError) + val exception = response.exception + assertIs(exception) + assertEquals("cannot resolve name", exception.error.message) + } + + @Test + fun userResultOnUserNameError() { + val response = UserResultQuery().parseResponse(userNameError) + + assertEquals("cannot resolve name", response.data?.user?.getOrNull()?.name?.graphQLErrorOrNull()?.message) + } + + @Test + fun userNullOnUserNameError() { + val response = UserNullQuery().parseResponse(userNameError) + + assertEquals("cannot resolve name", response.data!!.user?.name?.graphQLErrorOrNull()?.message) + } + + @Test + fun userOnUserSuccess() { + val response = UserQuery().parseResponse(userSuccess) + + assertEquals("Pancakes", response.data!!.user.getOrNull()?.name?.getOrNull()) + } + + @Test + fun userResultOnUserSuccess() { + val response = UserResultQuery().parseResponse(userSuccess) + + assertEquals("Pancakes", response.data!!.user.getOrThrow().name.getOrNull()) + } + + @Test + fun userNullOnUserSuccess() { + val response = UserNullQuery().parseResponse(userSuccess) + + assertEquals("Pancakes", response.data!!.user!!.name.getOrNull()) + } + + @Test + fun productOnProductPriceError() { + val response = ProductQuery().parseResponse(productPriceError) + + val exception = response.exception + assertIs(exception) + assertEquals("cannot resolve price", exception.error.message) + } + + @Test + fun productResultOnProductPriceError() { + val response = ProductResultQuery().parseResponse(productPriceError) + + assertEquals("cannot resolve price", response.data?.product?.getOrNull()?.price?.graphQLErrorOrNull()?.message) + } + + @Test + fun productNullOnProductPriceError() { + val response = ProductNullQuery().parseResponse(productPriceError) + + assertEquals("cannot resolve price", response.data?.product?.price?.graphQLErrorOrNull()?.message) + assertNotNull(response.data) + } + + @Test + fun productIgnoreErrorsOnProductPriceError() { + val response = ProductIgnoreErrorsQuery().parseResponse(productPriceError) + + assertNotNull(response.data?.product) + assertNull(response.data?.product?.getOrNull()?.price?.getOrNull()) + assertEquals("cannot resolve price", response.errors?.single()?.message) + } + + @Test + fun productPriceNullOnProductPriceError() { + val response = PriceNullQuery().parseResponse(productPriceError) + + assertNotNull(response.data?.product) + assertNull(response.data?.product?.getOrNull()?.price) + assertEquals("cannot resolve price", response.errors?.single()?.message) + } + + @Test + fun productPriceNullOnProductPriceNull() { + val response = PriceNullQuery().parseResponse(productPriceNull) + + assertNotNull(response.data?.product) + assertNull(response.data?.product?.getOrNull()?.price) + assertNull(response.errors) + } +} diff --git a/tests/catch/src/test/kotlin/test/CatchThrowTest.kt b/tests/catch/src/test/kotlin/test/CatchThrowTest.kt new file mode 100644 index 00000000000..f1ab34dc453 --- /dev/null +++ b/tests/catch/src/test/kotlin/test/CatchThrowTest.kt @@ -0,0 +1,182 @@ +package test + +import com.apollographql.apollo3.api.ApolloResponse +import com.apollographql.apollo3.api.CustomScalarAdapters +import com.apollographql.apollo3.api.Query +import com.apollographql.apollo3.api.graphQLErrorOrNull +import com.apollographql.apollo3.api.json.JsonReader +import com.apollographql.apollo3.api.json.jsonReader +import com.apollographql.apollo3.api.parseResponse +import com.apollographql.apollo3.api.getOrThrow +import com.apollographql.apollo3.exception.ApolloGraphQLException +import `throw`.PriceNullQuery +import `throw`.ProductIgnoreErrorsQuery +import `throw`.ProductNullQuery +import `throw`.ProductQuery +import `throw`.ProductResultQuery +import `throw`.UserNullQuery +import `throw`.UserQuery +import `throw`.UserResultQuery +import okio.Buffer +import org.intellij.lang.annotations.Language +import kotlin.test.Test +import kotlin.test.assertEquals +import kotlin.test.assertIs +import kotlin.test.assertNotNull +import kotlin.test.assertNull + +class CatchThrowTest { + @Test + fun userOnUserNameError() { + val response = UserQuery().parseResponse(userNameError) + val exception = response.exception + assertIs(exception) + assertEquals("cannot resolve name", exception.error.message) + } + + @Test + fun userResultOnUserNameError() { + val response = UserResultQuery().parseResponse(userNameError) + + assertEquals("cannot resolve name", response.data?.user?.graphQLErrorOrNull()?.message) + } + + @Test + fun userNullOnUserNameError() { + val response = UserNullQuery().parseResponse(userNameError) + + assertNull(response.data!!.user) + } + + @Test + fun userOnUserSuccess() { + val response = UserQuery().parseResponse(userSuccess) + + assertEquals("Pancakes", response.data!!.user.name) + } + + @Test + fun userResultOnUserSuccess() { + val response = UserResultQuery().parseResponse(userSuccess) + + assertEquals("Pancakes", response.data!!.user.getOrThrow().name) + } + + @Test + fun userNullOnUserSuccess() { + val response = UserNullQuery().parseResponse(userSuccess) + + assertEquals("Pancakes", response.data!!.user!!.name) + } + + @Test + fun productOnProductPriceError() { + val response = ProductQuery().parseResponse(productPriceError) + + val exception = response.exception + assertIs(exception) + assertEquals("cannot resolve price", exception.error.message) + } + + @Test + fun productResultOnProductPriceError() { + val response = ProductResultQuery().parseResponse(productPriceError) + + assertEquals("cannot resolve price", response.data?.product?.graphQLErrorOrNull()?.message) + } + + @Test + fun productNullOnProductPriceError() { + val response = ProductNullQuery().parseResponse(productPriceError) + + assertNull(response.data?.product) + assertNotNull(response.data) + } + + @Test + fun productIgnoreErrorsOnProductPriceError() { + val response = ProductIgnoreErrorsQuery().parseResponse(productPriceError) + + assertNotNull(response.data?.product) + assertNull(response.data?.product?.price) + assertEquals("cannot resolve price", response.errors?.single()?.message) + } + + @Test + fun productPriceNullOnProductPriceError() { + val response = PriceNullQuery().parseResponse(productPriceError) + + assertNotNull(response.data?.product) + assertNull(response.data?.product?.price) + assertEquals("cannot resolve price", response.errors?.single()?.message) + } + + @Test + fun productPriceNullOnProductPriceNull() { + val response = PriceNullQuery().parseResponse(productPriceNull) + + assertNotNull(response.data?.product) + assertNull(response.data?.product?.price) + assertNull(response.errors) + } +} + +private fun String.jsonReader(): JsonReader = Buffer().writeUtf8(this).jsonReader() + +fun Query.parseResponse(json: String): ApolloResponse = parseResponse(json.jsonReader(), null, CustomScalarAdapters.Empty, null) + +@Language("json") +val userNameError = """ + { + "errors": [ + { + "path": ["user", "name"], + "message": "cannot resolve name" + } + ], + "data": { + "user": { + "name": null + } + } + } + """.trimIndent() + +@Language("json") +val userSuccess = """ + { + "data": { + "user": { + "name": "Pancakes" + } + } + } + """.trimIndent() + +@Language("json") +val productPriceError = """ + { + "errors": [ + { + "path": ["product", "price"], + "message": "cannot resolve price" + } + ], + "data": { + "product": { + "price": null + } + } + } + """.trimIndent() + +@Language("json") +val productPriceNull = """ + { + "data": { + "product": { + "price": null + } + } + } + """.trimIndent() \ No newline at end of file