Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //
- // AUTO-GENERATED FILE. DO NOT MODIFY.
- //
- // This class was automatically generated by Apollo GraphQL version '3.7.2'.
- //
- package com.example.library.network.api.graphql
- import com.apollographql.apollo3.annotations.ApolloAdaptableWith
- import com.apollographql.apollo3.api.Adapter
- import com.apollographql.apollo3.api.CompiledField
- import com.apollographql.apollo3.api.CustomScalarAdapters
- import com.apollographql.apollo3.api.DefaultFakeResolver
- import com.apollographql.apollo3.api.FakeResolver
- import com.apollographql.apollo3.api.GlobalBuilder
- import com.apollographql.apollo3.api.Query
- import com.apollographql.apollo3.api.buildData
- import com.apollographql.apollo3.api.json.JsonWriter
- import com.apollographql.apollo3.api.obj
- import com.example.library.network.api.graphql.adapter.ActivityQuery_ResponseAdapter
- import com.example.library.network.api.graphql.adapter.ActivityQuery_VariablesAdapter
- import com.example.library.network.api.graphql.fragment.ClinicalTrialFragment
- import com.example.library.network.api.graphql.fragment.EventFragment
- import com.example.library.network.api.graphql.fragment.GuidelineFragment
- import com.example.library.network.api.graphql.fragment.MediaMentionFragment
- import com.example.library.network.api.graphql.fragment.PublicationFragment
- import com.example.library.network.api.graphql.selections.ActivityQuerySelections
- import com.example.library.network.api.graphql.type.QueryBuilder
- import com.example.library.network.api.graphql.type.__CustomScalarAdapters
- import com.example.library.network.api.graphql.type.__Schema
- import com.example.library.network.api.graphql.type.buildQuery
- import kotlin.String
- import kotlin.Unit
- import kotlin.collections.List
- public data class ActivityQuery(
- public val docId: String,
- public val expertId: String,
- ) : Query<ActivityQuery.Data> {
- 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 {
- ActivityQuery_VariablesAdapter.toJson(writer, customScalarAdapters, this)
- }
- public override fun adapter(): Adapter<Data> = ActivityQuery_ResponseAdapter.Data.obj()
- public override fun rootField(): CompiledField = CompiledField.Builder(
- name = "data",
- type = com.example.library.network.api.graphql.type.Query.type
- )
- .selections(selections = ActivityQuerySelections.__root)
- .build()
- @ApolloAdaptableWith(ActivityQuery_ResponseAdapter.Data::class)
- public data class Data(
- public val activity: Activity?,
- ) : Query.Data
- public sealed interface Activity {
- public val __typename: String
- /**
- * internal id
- */
- public val docId: String
- public val webSource: String?
- /**
- * Synthetic field for inline fragment on Event
- */
- public val onEvent: OnEvent?
- /**
- * Synthetic field for inline fragment on MediaMention
- */
- public val onMediaMention: OnMediaMention?
- /**
- * Synthetic field for 'eventFragment'
- */
- public val eventFragment: EventFragment?
- /**
- * Synthetic field for 'publicationFragment'
- */
- public val publicationFragment: PublicationFragment?
- /**
- * Synthetic field for 'mediaMentionFragment'
- */
- public val mediaMentionFragment: MediaMentionFragment?
- /**
- * Synthetic field for 'guidelineFragment'
- */
- public val guidelineFragment: GuidelineFragment?
- /**
- * Synthetic field for 'clinicalTrialFragment'
- */
- public val clinicalTrialFragment: ClinicalTrialFragment?
- }
- public data class EventActivity(
- public override val __typename: String,
- /**
- * internal id
- */
- public override val docId: String,
- public override val webSource: String?,
- /**
- * Synthetic field for inline fragment on Event
- */
- public override val onEvent: OnEvent,
- /**
- * Synthetic field for inline fragment on MediaMention
- */
- public override val onMediaMention: OnMediaMention?,
- /**
- * Synthetic field for 'eventFragment'
- */
- public override val eventFragment: EventFragment,
- /**
- * Synthetic field for 'publicationFragment'
- */
- public override val publicationFragment: PublicationFragment?,
- /**
- * Synthetic field for 'mediaMentionFragment'
- */
- public override val mediaMentionFragment: MediaMentionFragment?,
- /**
- * Synthetic field for 'guidelineFragment'
- */
- public override val guidelineFragment: GuidelineFragment?,
- /**
- * Synthetic field for 'clinicalTrialFragment'
- */
- public override val clinicalTrialFragment: ClinicalTrialFragment?,
- ) : Activity
- public data class MediaMentionActivity(
- public override val __typename: String,
- /**
- * internal id
- */
- public override val docId: String,
- public override val webSource: String?,
- /**
- * Synthetic field for inline fragment on Event
- */
- public override val onEvent: OnEvent?,
- /**
- * Synthetic field for inline fragment on MediaMention
- */
- public override val onMediaMention: OnMediaMention,
- /**
- * Synthetic field for 'eventFragment'
- */
- public override val eventFragment: EventFragment?,
- /**
- * Synthetic field for 'publicationFragment'
- */
- public override val publicationFragment: PublicationFragment?,
- /**
- * Synthetic field for 'mediaMentionFragment'
- */
- public override val mediaMentionFragment: MediaMentionFragment,
- /**
- * Synthetic field for 'guidelineFragment'
- */
- public override val guidelineFragment: GuidelineFragment?,
- /**
- * Synthetic field for 'clinicalTrialFragment'
- */
- public override val clinicalTrialFragment: ClinicalTrialFragment?,
- ) : Activity
- public data class PublicationActivity(
- public override val __typename: String,
- /**
- * internal id
- */
- public override val docId: String,
- public override val webSource: String?,
- /**
- * Synthetic field for inline fragment on Event
- */
- public override val onEvent: OnEvent?,
- /**
- * Synthetic field for inline fragment on MediaMention
- */
- public override val onMediaMention: OnMediaMention?,
- /**
- * Synthetic field for 'eventFragment'
- */
- public override val eventFragment: EventFragment?,
- /**
- * Synthetic field for 'publicationFragment'
- */
- public override val publicationFragment: PublicationFragment,
- /**
- * Synthetic field for 'mediaMentionFragment'
- */
- public override val mediaMentionFragment: MediaMentionFragment?,
- /**
- * Synthetic field for 'guidelineFragment'
- */
- public override val guidelineFragment: GuidelineFragment?,
- /**
- * Synthetic field for 'clinicalTrialFragment'
- */
- public override val clinicalTrialFragment: ClinicalTrialFragment?,
- ) : Activity
- public data class GuidelineActivity(
- public override val __typename: String,
- /**
- * internal id
- */
- public override val docId: String,
- public override val webSource: String?,
- /**
- * Synthetic field for inline fragment on Event
- */
- public override val onEvent: OnEvent?,
- /**
- * Synthetic field for inline fragment on MediaMention
- */
- public override val onMediaMention: OnMediaMention?,
- /**
- * Synthetic field for 'eventFragment'
- */
- public override val eventFragment: EventFragment?,
- /**
- * Synthetic field for 'publicationFragment'
- */
- public override val publicationFragment: PublicationFragment?,
- /**
- * Synthetic field for 'mediaMentionFragment'
- */
- public override val mediaMentionFragment: MediaMentionFragment?,
- /**
- * Synthetic field for 'guidelineFragment'
- */
- public override val guidelineFragment: GuidelineFragment,
- /**
- * Synthetic field for 'clinicalTrialFragment'
- */
- public override val clinicalTrialFragment: ClinicalTrialFragment?,
- ) : Activity
- public data class ClinicalTrialActivity(
- public override val __typename: String,
- /**
- * internal id
- */
- public override val docId: String,
- public override val webSource: String?,
- /**
- * Synthetic field for inline fragment on Event
- */
- public override val onEvent: OnEvent?,
- /**
- * Synthetic field for inline fragment on MediaMention
- */
- public override val onMediaMention: OnMediaMention?,
- /**
- * Synthetic field for 'eventFragment'
- */
- public override val eventFragment: EventFragment?,
- /**
- * Synthetic field for 'publicationFragment'
- */
- public override val publicationFragment: PublicationFragment?,
- /**
- * Synthetic field for 'mediaMentionFragment'
- */
- public override val mediaMentionFragment: MediaMentionFragment?,
- /**
- * Synthetic field for 'guidelineFragment'
- */
- public override val guidelineFragment: GuidelineFragment?,
- /**
- * Synthetic field for 'clinicalTrialFragment'
- */
- public override val clinicalTrialFragment: ClinicalTrialFragment,
- ) : Activity
- public data class OtherActivity(
- public override val __typename: String,
- /**
- * internal id
- */
- public override val docId: String,
- public override val webSource: String?,
- /**
- * Synthetic field for inline fragment on Event
- */
- public override val onEvent: OnEvent?,
- /**
- * Synthetic field for inline fragment on MediaMention
- */
- public override val onMediaMention: OnMediaMention?,
- /**
- * Synthetic field for 'eventFragment'
- */
- public override val eventFragment: EventFragment?,
- /**
- * Synthetic field for 'publicationFragment'
- */
- public override val publicationFragment: PublicationFragment?,
- /**
- * Synthetic field for 'mediaMentionFragment'
- */
- public override val mediaMentionFragment: MediaMentionFragment?,
- /**
- * Synthetic field for 'guidelineFragment'
- */
- public override val guidelineFragment: GuidelineFragment?,
- /**
- * Synthetic field for 'clinicalTrialFragment'
- */
- public override val clinicalTrialFragment: ClinicalTrialFragment?,
- ) : Activity
- public data class OnEvent(
- public val expertContributions: List<ExpertContribution?>,
- )
- public data class ExpertContribution(
- /**
- * internal id
- */
- public val docId: String,
- public val position: String,
- public val title: String?,
- public val session: Session?,
- )
- public data class Session(
- public val sessionId: String,
- public val sessionTitle: String,
- public val sessionWebSource: String?,
- )
- public data class OnMediaMention(
- public val latestExpertPublication: LatestExpertPublication?,
- )
- public data class LatestExpertPublication(
- public val activity: Activity1,
- )
- public data class Activity1(
- /**
- * internal id
- */
- public val docId: String,
- public val title: String?,
- )
- public companion object {
- public const val OPERATION_ID: String =
- "8197dab9a5ec297c961cfb65512b906abd45b6f1970804156ac056c1191ec16c"
- /**
- * The minimized GraphQL document being sent to the server to save a few bytes.
- * The un-minimized version is:
- *
- * query Activity($docId: ID!, $expertId: ID!) {
- * activity(docId: $docId) {
- * __typename
- * docId
- * webSource
- * ...eventFragment
- * ... on Event {
- * expertContributions(expertId: $expertId) {
- * docId
- * position
- * title
- * session {
- * sessionId
- * sessionTitle
- * sessionWebSource
- * }
- * }
- * }
- * ...publicationFragment
- * ...mediaMentionFragment
- * ... on MediaMention {
- * latestExpertPublication(expertId: $expertId) {
- * activity {
- * docId
- * title
- * }
- * }
- * }
- * ...guidelineFragment
- * ...clinicalTrialFragment
- * }
- * }
- *
- * fragment eventFragment on Event {
- * title
- * startDate
- * address {
- * city
- * country
- * }
- * }
- *
- * fragment publicationFragment on Publication {
- * title
- * startDate
- * journalName
- * maCitationCount
- * abstract
- * webSource
- * }
- *
- * fragment mediaMentionFragment on MediaMention {
- * title
- * startDate
- * }
- *
- * fragment guidelineFragment on Guideline {
- * title
- * startDate
- * journalName
- * webSource
- * }
- *
- * fragment clinicalTrialFragment on ClinicalTrial {
- * title
- * startDate
- * studyPhase
- * purpose
- * }
- */
- public val OPERATION_DOCUMENT: String
- get() =
- "query Activity(${'$'}docId: ID!, ${'$'}expertId: ID!) { activity(docId: ${'$'}docId) { __typename docId webSource ...eventFragment ... on Event { expertContributions(expertId: ${'$'}expertId) { docId position title session { sessionId sessionTitle sessionWebSource } } } ...publicationFragment ...mediaMentionFragment ... on MediaMention { latestExpertPublication(expertId: ${'$'}expertId) { activity { docId title } } } ...guidelineFragment ...clinicalTrialFragment } } fragment eventFragment on Event { title startDate address { city country } } fragment publicationFragment on Publication { title startDate journalName maCitationCount abstract webSource } fragment mediaMentionFragment on MediaMention { title startDate } fragment guidelineFragment on Guideline { title startDate journalName webSource } fragment clinicalTrialFragment on ClinicalTrial { title startDate studyPhase purpose }"
- public const val OPERATION_NAME: String = "Activity"
- public fun Data(resolver: FakeResolver = DefaultFakeResolver(__Schema.all),
- block: QueryBuilder.() -> Unit = {}): Data = buildData(
- ActivityQuery_ResponseAdapter.Data,
- ActivityQuerySelections.__root,
- "Query",
- GlobalBuilder.buildQuery(block),
- resolver,
- __CustomScalarAdapters,
- )
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement