All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.com.apollographql.apollo.network.websocket.SubscriptionParser.kt Maven / Gradle / Ivy

package com.apollographql.apollo.network.websocket

import com.apollographql.apollo.annotations.ApolloExperimental
import com.apollographql.apollo.api.ApolloRequest
import com.apollographql.apollo.api.ApolloResponse
import com.apollographql.apollo.api.Operation
import com.apollographql.apollo.api.json.ApolloJsonElement

/**
 * A [SubscriptionParser] transforms JSON responses contained in WebSocket messages into parsed [ApolloResponse]
 */
@ApolloExperimental
interface SubscriptionParser {
  fun parse(response: ApolloJsonElement): ApolloResponse?
}

/**
 * A factory for [SubscriptionParser]
 */
@ApolloExperimental
interface SubscriptionParserFactory {
  fun  createParser(request: ApolloRequest): SubscriptionParser
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy