morpheus-graphql-0.15.0: Morpheus GraphQL

Safe HaskellNone
LanguageHaskell2010

Data.Morpheus.Types.Internal.Subscription

Synopsis

Documentation

disconnect :: Scope WS e m -> Input WS -> m () Source #

connectionThread :: MonadUnliftIO m => App e m -> Scope WS e m -> m () Source #

runStreamWS :: Monad m => Scope WS e m -> Stream WS e m -> m () Source #

runStreamHTTP :: Monad m => Scope HTTP e m -> Stream HTTP e m -> m GQLResponse Source #

data Scope (api :: API) event (m :: * -> *) where Source #

Constructors

ScopeHTTP 

Fields

ScopeWS 

Fields

data Input (api :: API) where Source #

Constructors

Init :: ID -> Input WS 
Request :: GQLRequest -> Input HTTP 

type WS = WS Source #

type HTTP = HTTP Source #

publish :: (Monad m, Eq channel) => Event channel content -> ClientConnectionStore (Event channel content) m -> m () Source #

data Store e m Source #

PubSubStore interface shared GraphQL state between websocket and http server, you can define your own store if you provide write and read methods to work properly Morpheus needs all entries of ClientConnectionStore (+ client Callbacks) that why it is recomended that you use many local ClientStores on evenry server node rathen then single centralized Store.

Constructors

Store 

initDefaultStore :: (MonadIO m, MonadIO m2) => m2 (Store event m) Source #

initializes empty GraphQL state

publishEventWith :: (MonadIO m, Eq channel) => Store (Event channel cont) m -> Event channel cont -> m () Source #

empty :: Collection a coll => coll #

toList :: ClientConnectionStore e m -> [(UUID, ClientConnection e m)] Source #

connectionSessionIds :: ClientConnection e m -> [SessionID] Source #

streamApp :: Monad m => App e m -> Input api -> Stream api e m Source #