com.lahzouz.apollo.graphql.client.GetAuthorsQuery.kt Maven / Gradle / Ivy
//
// AUTO-GENERATED FILE. DO NOT MODIFY.
//
// This class was automatically generated by Apollo GraphQL version '3.0.0'.
//
package com.lahzouz.apollo.graphql.client
import com.apollographql.apollo3.api.Adapter
import com.apollographql.apollo3.api.CompiledField
import com.apollographql.apollo3.api.CustomScalarAdapters
import com.apollographql.apollo3.api.Query
import com.apollographql.apollo3.api.json.JsonWriter
import com.apollographql.apollo3.api.obj
import com.lahzouz.apollo.graphql.client.adapter.GetAuthorsQuery_ResponseAdapter
import com.lahzouz.apollo.graphql.client.selections.GetAuthorsQuerySelections
import kotlin.String
import kotlin.Unit
import kotlin.collections.List
public class GetAuthorsQuery() : Query {
public override fun id(): String = OPERATION_ID
public override fun document(): String = OPERATION_DOCUMENT
public override fun name(): String = OPERATION_NAME
public override fun serializeVariables(writer: JsonWriter,
customScalarAdapters: CustomScalarAdapters): Unit {
// This operation doesn't have any variable
}
public override fun adapter(): Adapter {
return GetAuthorsQuery_ResponseAdapter.Data.obj()
}
public override fun rootField(): CompiledField = CompiledField.Builder(
name = "data",
type = com.lahzouz.apollo.graphql.client.type.Query.type
)
.selections(selections = GetAuthorsQuerySelections.root)
.build()
public data class Data(
public val authors: List
) : Query.Data
public data class Author(
public val name: String
)
public companion object {
public const val OPERATION_ID: String =
"4bc3b097bfa3f22a08883759eb50246c7c386e7d3dacfd7c8dcd293bdb464b21"
/**
* The minimized GraphQL document being sent to the server to save a few bytes.
* The un-minimized version is:
*
* query GetAuthors {
* authors {
* name
* }
* }
*/
public const val OPERATION_DOCUMENT: String = "query GetAuthors { authors { name } }"
public const val OPERATION_NAME: String = "GetAuthors"
}
}