graphql-engine-1.0.0: GraphQL API over Postgres
Safe HaskellNone
LanguageHaskell2010

Hasura.Server.SchemaUpdate

Synopsis

Documentation

data ThreadType Source #

Constructors

TTListener 
TTProcessor 

Instances

Instances details
Eq ThreadType Source # 
Instance details

Defined in Hasura.Server.SchemaUpdate

Show ThreadType Source # 
Instance details

Defined in Hasura.Server.SchemaUpdate

data ThreadError Source #

Constructors

TEPayloadParse !Text 
TEQueryError !QErr 

Instances

Instances details
ToJSON ThreadError Source # 
Instance details

Defined in Hasura.Server.SchemaUpdate

Methods

toJSON :: ThreadError -> Value

toEncoding :: ThreadError -> Encoding

toJSONList :: [ThreadError] -> Value

toEncodingList :: [ThreadError] -> Encoding

startSchemaSyncListenerThread :: ForkableMonadIO m => Logger Hasura -> PGPool -> InstanceId -> NonNegative Milliseconds -> TMVar MetadataResourceVersion -> ManagedT m Thread Source #

An async thread which listen to Postgres notify to enable schema syncing See Note [Schema Cache Sync]

startSchemaSyncProcessorThread :: (ForkableMonadIO m, MonadMetadataStorage (MetadataStorageT m), MonadResolveSource m) => Logger Hasura -> Manager -> TMVar MetadataResourceVersion -> SchemaCacheRef -> InstanceId -> ServerConfigCtx -> TVar Bool -> ManagedT m Thread Source #

An async thread which processes the schema sync events See Note [Schema Cache Sync]

forcePut :: TMVar a -> a -> IO () Source #

updateErrorInState :: ErrorState -> QErr -> MetadataResourceVersion -> ErrorState Source #

NOTE: this can be updated to use lenses

listener :: MonadIO m => Logger Hasura -> PGPool -> TMVar MetadataResourceVersion -> Milliseconds -> m void Source #

An IO action that listens to postgres for events and pushes them to a Queue, in a loop forever.

processor :: forall m void. (ForkableMonadIO m, MonadMetadataStorage (MetadataStorageT m), MonadResolveSource m) => Logger Hasura -> Manager -> TMVar MetadataResourceVersion -> SchemaCacheRef -> InstanceId -> ServerConfigCtx -> TVar Bool -> m void Source #

An IO action that processes events from Queue, in a loop forever.

logInfo :: MonadIO m => Logger Hasura -> ThreadType -> Value -> m () Source #

logError :: (MonadIO m, ToJSON a) => Logger Hasura -> ThreadType -> a -> m () Source #