graphql-engine-1.0.0: GraphQL API over Postgres
Safe HaskellSafe-Inferred
LanguageHaskell2010

Hasura.GraphQL.Transport.Backend

Synopsis

Documentation

class BackendExecute b => BackendTransport (b :: BackendType) where Source #

This typeclass enacapsulates how a given backend sends queries and mutations over the network. Each backend is currently responsible for both logging and tracing, for now.

Methods

runDBQuery :: forall m. (MonadIO m, MonadBaseControl IO m, MonadError QErr m, MonadQueryLog m, MonadExecutionLog m, MonadTrace m) => RequestId -> GQLReqUnparsed -> RootFieldAlias -> UserInfo -> Logger Hasura -> Maybe (CredentialCache AgentLicenseKey) -> SourceConfig b -> OnBaseMonad (ExecutionMonad b) (Maybe (AnyBackend ExecutionStats), EncJSON) -> Maybe (PreparedQuery b) -> ResolvedConnectionTemplate b -> m (DiffTime, EncJSON) Source #

runDBMutation :: forall m. (MonadIO m, MonadBaseControl IO m, MonadError QErr m, MonadQueryLog m, MonadTrace m) => RequestId -> GQLReqUnparsed -> RootFieldAlias -> UserInfo -> Logger Hasura -> Maybe (CredentialCache AgentLicenseKey) -> SourceConfig b -> OnBaseMonad (ExecutionMonad b) EncJSON -> Maybe (PreparedQuery b) -> ResolvedConnectionTemplate b -> m (DiffTime, EncJSON) Source #

runDBSubscription Source #

Arguments

:: forall m. (MonadIO m, MonadBaseControl IO m) 
=> SourceConfig b 
-> MultiplexedQuery b 
-> [(CohortId, CohortVariables)]

WARNING: Postgres-specific, ignored by other backends

-> ResolvedConnectionTemplate b 
-> m (DiffTime, Either QErr [(CohortId, ByteString)]) 

runDBStreamingSubscription Source #

Arguments

:: forall m. (MonadIO m, MonadBaseControl IO m) 
=> SourceConfig b 
-> MultiplexedQuery b 
-> [(CohortId, CohortVariables)]

WARNING: Postgres-specific, ignored by other backends

-> ResolvedConnectionTemplate b 
-> m (DiffTime, Either QErr [(CohortId, ByteString, CursorVariableValues)]) 

runDBQueryExplain :: forall m. (MonadIO m, MonadError QErr m, MonadBaseControl IO m, MonadTrace m) => Maybe (CredentialCache AgentLicenseKey) -> DBStepInfo b -> m EncJSON Source #

Instances

Instances details
BackendTransport 'BigQuery Source # 
Instance details

Defined in Hasura.Backends.BigQuery.Instances.Transport

Methods

runDBQuery :: (MonadIO m, MonadBaseControl IO m, MonadError QErr m, MonadQueryLog m, MonadExecutionLog m, MonadTrace m) => RequestId -> GQLReqUnparsed -> RootFieldAlias -> UserInfo -> Logger Hasura -> Maybe (CredentialCache AgentLicenseKey) -> SourceConfig 'BigQuery -> OnBaseMonad (ExecutionMonad 'BigQuery) (Maybe (AnyBackend ExecutionStats), EncJSON) -> Maybe (PreparedQuery 'BigQuery) -> ResolvedConnectionTemplate 'BigQuery -> m (DiffTime, EncJSON) Source #

runDBMutation :: (MonadIO m, MonadBaseControl IO m, MonadError QErr m, MonadQueryLog m, MonadTrace m) => RequestId -> GQLReqUnparsed -> RootFieldAlias -> UserInfo -> Logger Hasura -> Maybe (CredentialCache AgentLicenseKey) -> SourceConfig 'BigQuery -> OnBaseMonad (ExecutionMonad 'BigQuery) EncJSON -> Maybe (PreparedQuery 'BigQuery) -> ResolvedConnectionTemplate 'BigQuery -> m (DiffTime, EncJSON) Source #

runDBSubscription :: (MonadIO m, MonadBaseControl IO m) => SourceConfig 'BigQuery -> MultiplexedQuery 'BigQuery -> [(CohortId, CohortVariables)] -> ResolvedConnectionTemplate 'BigQuery -> m (DiffTime, Either QErr [(CohortId, ByteString)]) Source #

runDBStreamingSubscription :: (MonadIO m, MonadBaseControl IO m) => SourceConfig 'BigQuery -> MultiplexedQuery 'BigQuery -> [(CohortId, CohortVariables)] -> ResolvedConnectionTemplate 'BigQuery -> m (DiffTime, Either QErr [(CohortId, ByteString, CursorVariableValues)]) Source #

runDBQueryExplain :: (MonadIO m, MonadError QErr m, MonadBaseControl IO m, MonadTrace m) => Maybe (CredentialCache AgentLicenseKey) -> DBStepInfo 'BigQuery -> m EncJSON Source #

BackendTransport 'DataConnector Source # 
Instance details

Defined in Hasura.Backends.DataConnector.Adapter.Transport

Methods

runDBQuery :: (MonadIO m, MonadBaseControl IO m, MonadError QErr m, MonadQueryLog m, MonadExecutionLog m, MonadTrace m) => RequestId -> GQLReqUnparsed -> RootFieldAlias -> UserInfo -> Logger Hasura -> Maybe (CredentialCache AgentLicenseKey) -> SourceConfig 'DataConnector -> OnBaseMonad (ExecutionMonad 'DataConnector) (Maybe (AnyBackend ExecutionStats), EncJSON) -> Maybe (PreparedQuery 'DataConnector) -> ResolvedConnectionTemplate 'DataConnector -> m (DiffTime, EncJSON) Source #

runDBMutation :: (MonadIO m, MonadBaseControl IO m, MonadError QErr m, MonadQueryLog m, MonadTrace m) => RequestId -> GQLReqUnparsed -> RootFieldAlias -> UserInfo -> Logger Hasura -> Maybe (CredentialCache AgentLicenseKey) -> SourceConfig 'DataConnector -> OnBaseMonad (ExecutionMonad 'DataConnector) EncJSON -> Maybe (PreparedQuery 'DataConnector) -> ResolvedConnectionTemplate 'DataConnector -> m (DiffTime, EncJSON) Source #

runDBSubscription :: (MonadIO m, MonadBaseControl IO m) => SourceConfig 'DataConnector -> MultiplexedQuery 'DataConnector -> [(CohortId, CohortVariables)] -> ResolvedConnectionTemplate 'DataConnector -> m (DiffTime, Either QErr [(CohortId, ByteString)]) Source #

runDBStreamingSubscription :: (MonadIO m, MonadBaseControl IO m) => SourceConfig 'DataConnector -> MultiplexedQuery 'DataConnector -> [(CohortId, CohortVariables)] -> ResolvedConnectionTemplate 'DataConnector -> m (DiffTime, Either QErr [(CohortId, ByteString, CursorVariableValues)]) Source #

runDBQueryExplain :: (MonadIO m, MonadError QErr m, MonadBaseControl IO m, MonadTrace m) => Maybe (CredentialCache AgentLicenseKey) -> DBStepInfo 'DataConnector -> m EncJSON Source #

BackendTransport 'MSSQL Source # 
Instance details

Defined in Hasura.Backends.MSSQL.Instances.Transport

Methods

runDBQuery :: (MonadIO m, MonadBaseControl IO m, MonadError QErr m, MonadQueryLog m, MonadExecutionLog m, MonadTrace m) => RequestId -> GQLReqUnparsed -> RootFieldAlias -> UserInfo -> Logger Hasura -> Maybe (CredentialCache AgentLicenseKey) -> SourceConfig 'MSSQL -> OnBaseMonad (ExecutionMonad 'MSSQL) (Maybe (AnyBackend ExecutionStats), EncJSON) -> Maybe (PreparedQuery 'MSSQL) -> ResolvedConnectionTemplate 'MSSQL -> m (DiffTime, EncJSON) Source #

runDBMutation :: (MonadIO m, MonadBaseControl IO m, MonadError QErr m, MonadQueryLog m, MonadTrace m) => RequestId -> GQLReqUnparsed -> RootFieldAlias -> UserInfo -> Logger Hasura -> Maybe (CredentialCache AgentLicenseKey) -> SourceConfig 'MSSQL -> OnBaseMonad (ExecutionMonad 'MSSQL) EncJSON -> Maybe (PreparedQuery 'MSSQL) -> ResolvedConnectionTemplate 'MSSQL -> m (DiffTime, EncJSON) Source #

runDBSubscription :: (MonadIO m, MonadBaseControl IO m) => SourceConfig 'MSSQL -> MultiplexedQuery 'MSSQL -> [(CohortId, CohortVariables)] -> ResolvedConnectionTemplate 'MSSQL -> m (DiffTime, Either QErr [(CohortId, ByteString)]) Source #

runDBStreamingSubscription :: (MonadIO m, MonadBaseControl IO m) => SourceConfig 'MSSQL -> MultiplexedQuery 'MSSQL -> [(CohortId, CohortVariables)] -> ResolvedConnectionTemplate 'MSSQL -> m (DiffTime, Either QErr [(CohortId, ByteString, CursorVariableValues)]) Source #

runDBQueryExplain :: (MonadIO m, MonadError QErr m, MonadBaseControl IO m, MonadTrace m) => Maybe (CredentialCache AgentLicenseKey) -> DBStepInfo 'MSSQL -> m EncJSON Source #

(Backend ('Postgres pgKind), PostgresAnnotatedFieldJSON pgKind) => BackendTransport ('Postgres pgKind) Source # 
Instance details

Defined in Hasura.Backends.Postgres.Instances.Transport

Methods

runDBQuery :: (MonadIO m, MonadBaseControl IO m, MonadError QErr m, MonadQueryLog m, MonadExecutionLog m, MonadTrace m) => RequestId -> GQLReqUnparsed -> RootFieldAlias -> UserInfo -> Logger Hasura -> Maybe (CredentialCache AgentLicenseKey) -> SourceConfig ('Postgres pgKind) -> OnBaseMonad (ExecutionMonad ('Postgres pgKind)) (Maybe (AnyBackend ExecutionStats), EncJSON) -> Maybe (PreparedQuery ('Postgres pgKind)) -> ResolvedConnectionTemplate ('Postgres pgKind) -> m (DiffTime, EncJSON) Source #

runDBMutation :: (MonadIO m, MonadBaseControl IO m, MonadError QErr m, MonadQueryLog m, MonadTrace m) => RequestId -> GQLReqUnparsed -> RootFieldAlias -> UserInfo -> Logger Hasura -> Maybe (CredentialCache AgentLicenseKey) -> SourceConfig ('Postgres pgKind) -> OnBaseMonad (ExecutionMonad ('Postgres pgKind)) EncJSON -> Maybe (PreparedQuery ('Postgres pgKind)) -> ResolvedConnectionTemplate ('Postgres pgKind) -> m (DiffTime, EncJSON) Source #

runDBSubscription :: (MonadIO m, MonadBaseControl IO m) => SourceConfig ('Postgres pgKind) -> MultiplexedQuery ('Postgres pgKind) -> [(CohortId, CohortVariables)] -> ResolvedConnectionTemplate ('Postgres pgKind) -> m (DiffTime, Either QErr [(CohortId, ByteString)]) Source #

runDBStreamingSubscription :: (MonadIO m, MonadBaseControl IO m) => SourceConfig ('Postgres pgKind) -> MultiplexedQuery ('Postgres pgKind) -> [(CohortId, CohortVariables)] -> ResolvedConnectionTemplate ('Postgres pgKind) -> m (DiffTime, Either QErr [(CohortId, ByteString, CursorVariableValues)]) Source #

runDBQueryExplain :: (MonadIO m, MonadError QErr m, MonadBaseControl IO m, MonadTrace m) => Maybe (CredentialCache AgentLicenseKey) -> DBStepInfo ('Postgres pgKind) -> m EncJSON Source #