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

Hasura.Backends.Postgres.Execute.Subscription

Description

Postgres Execute subscription

Multiplex is an optimization which allows us to group similar queries into a single query, and routing the response rows afterwards. See https://hasura.io/docs/latest/graphql/core/databases/postgres/subscriptions/execution-and-performance.html for more details

See Execute.

Synopsis

Documentation

data QueryParametersInfo (b :: BackendType) Source #

Internal: Used to collect information about various parameters of a subscription field's AST as we resolve them to SQL expressions.

Constructors

QueryParametersInfo 

Fields

Instances

Instances details
Monoid (QueryParametersInfo b) Source # 
Instance details

Defined in Hasura.Backends.Postgres.Execute.Subscription

Semigroup (QueryParametersInfo b) Source # 
Instance details

Defined in Hasura.Backends.Postgres.Execute.Subscription

Generic (QueryParametersInfo b) Source # 
Instance details

Defined in Hasura.Backends.Postgres.Execute.Subscription

Associated Types

type Rep (QueryParametersInfo b) :: Type -> Type #

type Rep (QueryParametersInfo b) Source # 
Instance details

Defined in Hasura.Backends.Postgres.Execute.Subscription

type Rep (QueryParametersInfo b) = D1 ('MetaData "QueryParametersInfo" "Hasura.Backends.Postgres.Execute.Subscription" "graphql-engine-1.0.0-inplace" 'False) (C1 ('MetaCons "QueryParametersInfo" 'PrefixI 'True) (S1 ('MetaSel ('Just "_qpiReusableVariableValues") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (HashMap Name (ColumnValue b))) :*: (S1 ('MetaSel ('Just "_qpiSyntheticVariableValues") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Seq (ColumnValue b))) :*: S1 ('MetaSel ('Just "_qpiReferencedSessionVariables") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (HashSet SessionVariable)))))

validateVariablesTx :: forall pgKind f m. (Traversable f, MonadTx m, MonadIO m) => f (ColumnValue ('Postgres pgKind)) -> m (ValidatedVariables f) Source #

Checks if the provided arguments are valid values for their corresponding types. | Generates SQL of the format "select v1::t1, v2::t2 ..."

resolveMultiplexedValue :: (MonadState (QueryParametersInfo ('Postgres pgKind)) m, MonadError QErr m) => SessionVariables -> UnpreparedValue ('Postgres pgKind) -> m SQLExp Source #

Resolves an UnresolvedVal by converting UVPG values to SQL expressions that refer to the result_vars input object, collecting information about various parameters of the query along the way.

executeQuery :: (MonadTx m, FromRes a) => Query -> [(CohortId, CohortVariables)] -> m a Source #

Internal; used by both executeMultiplexedQuery, executeStreamingMultiplexedQuery and pgDBSubscriptionExplain.