Package com. trib3. graphql. websocket
Types
GraphQLContextWebSocketCreatorFactory
Link copied to clipboard
interface GraphQLContextWebSocketCreatorFactory
Content copied to clipboard
GraphQLCoroutine
Link copied to clipboard
GraphQLWebSocketAdapter
Link copied to clipboard
open class GraphQLWebSocketAdapter(channel: Channel<OperationMessage<*>>, objectMapper: ObjectMapper, dispatcher: CoroutineDispatcher) : WebSocketAdapter, CoroutineScope
Content copied to clipboard
WebSocketAdapter implementation that bridges incoming WebSocket events into a coroutine Channel to be handled by a consumer, and provides access to the remote for sending messages to the client.
GraphQLWebSocketConsumer
Link copied to clipboard
class GraphQLWebSocketConsumer(graphQL: GraphQL, graphQLConfig: GraphQLConfig, upgradeContainerRequestContext: ContainerRequestContext, channel: Channel<OperationMessage<*>>, adapter: GraphQLWebSocketAdapter, keepAliveDispatcher: CoroutineDispatcher, dataLoaderRegistryFactory: DataLoaderRegistryFactory?, graphQLWebSocketAuthenticator: GraphQLWebSocketAuthenticator?)
Content copied to clipboard
Coroutine based consumer that listens for events on coming from the WebSocket managed by a GraphQLWebSocketAdapter, and implements the apollo graphql-ws protocol from https://github.com/apollographql/subscriptions-transport-ws/blob/HEAD/PROTOCOL.
GraphQLWebSocketCreator
Link copied to clipboard
class GraphQLWebSocketCreator(graphQL: GraphQL, objectMapper: ObjectMapper, graphQLConfig: GraphQLConfig, containerRequestContext: ContainerRequestContext, dataLoaderRegistryFactory: DataLoaderRegistryFactory?, graphQLWebSocketAuthenticator: GraphQLWebSocketAuthenticator?) : WebSocketCreator
Content copied to clipboard
WebSocketCreator that creates a GraphQLWebSocketAdapter, a Channel that gets sent WebSocket API events, and a GraphQLWebSocketConsumer to consume that channel.
GraphQLWebSocketCreatorFactory
Link copied to clipboard
class GraphQLWebSocketCreatorFactory @Inject() constructor(graphQL: GraphQL, objectMapper: ObjectMapper, graphQLConfig: GraphQLConfig, @Nullable() dataLoaderRegistryFactory: DataLoaderRegistryFactory?, @Nullable() graphQLWebSocketAuthenticator: GraphQLWebSocketAuthenticator?) : GraphQLContextWebSocketCreatorFactory
Content copied to clipboard
Factory for getting a GraphQLWebSocketCreator for a given context
GraphQLWebSocketDropwizardAuthenticator
Link copied to clipboard
class GraphQLWebSocketDropwizardAuthenticator @Inject() constructor(@Nullable() authFilter: AuthFilter<*, *>?) : Function1<@JvmSuppressWildcards() ContainerRequestContext, @JvmSuppressWildcards() Principal?>
Content copied to clipboard
A GraphQLWebSocketAuthenticator that delegates authentication to a Dropwizard AuthFilter from the Guice injector.
KeepAliveCoroutine
Link copied to clipboard
class KeepAliveCoroutine(graphQLConfig: GraphQLConfig, channel: Channel<OperationMessage<*>>, message: OperationMessage<*>) : GraphQLCoroutine
Content copied to clipboard
Coroutine that sends a keepalive ping over the websocket every GraphQLConfig.keepAliveIntervalSeconds seconds until it gets canceled by its parent
OperationMessage
Link copied to clipboard
data class OperationMessage<T : Any>(type: OperationType<T>?, id: String?, payload: T?)
Content copied to clipboard
OperationType
Link copied to clipboard
QueryCoroutine
Link copied to clipboard
class QueryCoroutine(graphQL: GraphQL, context: GraphQLContext, channel: Channel<OperationMessage<*>>, messageId: String, payload: GraphQLRequest, dataLoaderRegistryFactory: DataLoaderRegistryFactory?) : GraphQLCoroutine
Content copied to clipboard