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

Hasura.RQL.DDL.Schema.Cache.Common

Description

Types/functions shared between modules that implement Hasura.RQL.DDL.Schema.Cache. Other modules should not import this module directly.

Synopsis

Documentation

data InvalidationKeys Source #

InvalidationKeys used to apply requested CacheInvalidations.

Instances

Instances details
Eq InvalidationKeys Source # 
Instance details

Defined in Hasura.RQL.DDL.Schema.Cache.Common

Show InvalidationKeys Source # 
Instance details

Defined in Hasura.RQL.DDL.Schema.Cache.Common

Generic InvalidationKeys Source # 
Instance details

Defined in Hasura.RQL.DDL.Schema.Cache.Common

Associated Types

type Rep InvalidationKeys :: Type -> Type #

Select InvalidationKeys Source # 
Instance details

Defined in Hasura.RQL.DDL.Schema.Cache.Common

Associated Types

type Selector InvalidationKeys :: Type -> Type Source #

Cacheable InvalidationKeys Source # 
Instance details

Defined in Hasura.RQL.DDL.Schema.Cache.Common

type Rep InvalidationKeys Source # 
Instance details

Defined in Hasura.RQL.DDL.Schema.Cache.Common

type Rep InvalidationKeys = D1 ('MetaData "InvalidationKeys" "Hasura.RQL.DDL.Schema.Cache.Common" "graphql-engine-1.0.0-inplace" 'False) (C1 ('MetaCons "InvalidationKeys" 'PrefixI 'True) (S1 ('MetaSel ('Just "_ikMetadata") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 InvalidationKey) :*: (S1 ('MetaSel ('Just "_ikRemoteSchemas") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (HashMap RemoteSchemaName InvalidationKey)) :*: S1 ('MetaSel ('Just "_ikSources") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (HashMap SourceName InvalidationKey)))))
type Selector InvalidationKeys Source # 
Instance details

Defined in Hasura.RQL.DDL.Schema.Cache.Common

data TableBuildInput b Source #

Instances

Instances details
Backend b => Eq (TableBuildInput b) Source # 
Instance details

Defined in Hasura.RQL.DDL.Schema.Cache.Common

Backend b => Show (TableBuildInput b) Source # 
Instance details

Defined in Hasura.RQL.DDL.Schema.Cache.Common

Generic (TableBuildInput b) Source # 
Instance details

Defined in Hasura.RQL.DDL.Schema.Cache.Common

Associated Types

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

Backend b => NFData (TableBuildInput b) Source # 
Instance details

Defined in Hasura.RQL.DDL.Schema.Cache.Common

Methods

rnf :: TableBuildInput b -> () #

Backend b => Cacheable (TableBuildInput b) Source # 
Instance details

Defined in Hasura.RQL.DDL.Schema.Cache.Common

type Rep (TableBuildInput b) Source # 
Instance details

Defined in Hasura.RQL.DDL.Schema.Cache.Common

type Rep (TableBuildInput b) = D1 ('MetaData "TableBuildInput" "Hasura.RQL.DDL.Schema.Cache.Common" "graphql-engine-1.0.0-inplace" 'False) (C1 ('MetaCons "TableBuildInput" 'PrefixI 'True) ((S1 ('MetaSel ('Just "_tbiName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (TableName b)) :*: S1 ('MetaSel ('Just "_tbiIsEnum") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Bool)) :*: (S1 ('MetaSel ('Just "_tbiConfiguration") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (TableConfig b)) :*: S1 ('MetaSel ('Just "_tbiApolloFederationConfig") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe ApolloFederationConfig)))))

data NonColumnTableInputs b Source #

Instances

Instances details
Backend b => Eq (NonColumnTableInputs b) Source # 
Instance details

Defined in Hasura.RQL.DDL.Schema.Cache.Common

Backend b => Show (NonColumnTableInputs b) Source # 
Instance details

Defined in Hasura.RQL.DDL.Schema.Cache.Common

Generic (NonColumnTableInputs b) Source # 
Instance details

Defined in Hasura.RQL.DDL.Schema.Cache.Common

Associated Types

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

type Rep (NonColumnTableInputs b) Source # 
Instance details

Defined in Hasura.RQL.DDL.Schema.Cache.Common

type Rep (NonColumnTableInputs b) = D1 ('MetaData "NonColumnTableInputs" "Hasura.RQL.DDL.Schema.Cache.Common" "graphql-engine-1.0.0-inplace" 'False) (C1 ('MetaCons "NonColumnTableInputs" 'PrefixI 'True) ((S1 ('MetaSel ('Just "_nctiTable") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (TableName b)) :*: S1 ('MetaSel ('Just "_nctiObjectRelationships") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [ObjRelDef b])) :*: (S1 ('MetaSel ('Just "_nctiArrayRelationships") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [ArrRelDef b]) :*: (S1 ('MetaSel ('Just "_nctiComputedFields") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [ComputedFieldMetadata b]) :*: S1 ('MetaSel ('Just "_nctiRemoteRelationships") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [RemoteRelationship])))))

data TablePermissionInputs b Source #

Instances

Instances details
(Backend b, Eq (TableName b)) => Eq (TablePermissionInputs b) Source # 
Instance details

Defined in Hasura.RQL.DDL.Schema.Cache.Common

(Backend b, Show (TableName b)) => Show (TablePermissionInputs b) Source # 
Instance details

Defined in Hasura.RQL.DDL.Schema.Cache.Common

Generic (TablePermissionInputs b) Source # 
Instance details

Defined in Hasura.RQL.DDL.Schema.Cache.Common

Associated Types

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

Backend b => Cacheable (TablePermissionInputs b) Source # 
Instance details

Defined in Hasura.RQL.DDL.Schema.Cache.Common

type Rep (TablePermissionInputs b) Source # 
Instance details

Defined in Hasura.RQL.DDL.Schema.Cache.Common

type Rep (TablePermissionInputs b) = D1 ('MetaData "TablePermissionInputs" "Hasura.RQL.DDL.Schema.Cache.Common" "graphql-engine-1.0.0-inplace" 'False) (C1 ('MetaCons "TablePermissionInputs" 'PrefixI 'True) ((S1 ('MetaSel ('Just "_tpiTable") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (TableName b)) :*: S1 ('MetaSel ('Just "_tpiInsert") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [InsPermDef b])) :*: (S1 ('MetaSel ('Just "_tpiSelect") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [SelPermDef b]) :*: (S1 ('MetaSel ('Just "_tpiUpdate") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [UpdPermDef b]) :*: S1 ('MetaSel ('Just "_tpiDelete") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [DelPermDef b])))))

data BuildOutputs Source #

The direct output of buildSchemaCacheRule. Contains most of the things necessary to build a schema cache, but dependencies and inconsistent metadata objects are collected via a separate MonadWriter side channel.

Constructors

BuildOutputs 

Fields

newtype CacheBuild a Source #

The monad in which @RebuildableSchemaCache is being run

Instances

Instances details
Monad CacheBuild Source # 
Instance details

Defined in Hasura.RQL.DDL.Schema.Cache.Common

Methods

(>>=) :: CacheBuild a -> (a -> CacheBuild b) -> CacheBuild b #

(>>) :: CacheBuild a -> CacheBuild b -> CacheBuild b #

return :: a -> CacheBuild a #

Functor CacheBuild Source # 
Instance details

Defined in Hasura.RQL.DDL.Schema.Cache.Common

Methods

fmap :: (a -> b) -> CacheBuild a -> CacheBuild b #

(<$) :: a -> CacheBuild b -> CacheBuild a #

Applicative CacheBuild Source # 
Instance details

Defined in Hasura.RQL.DDL.Schema.Cache.Common

Methods

pure :: a -> CacheBuild a #

(<*>) :: CacheBuild (a -> b) -> CacheBuild a -> CacheBuild b #

liftA2 :: (a -> b -> c) -> CacheBuild a -> CacheBuild b -> CacheBuild c #

(*>) :: CacheBuild a -> CacheBuild b -> CacheBuild b #

(<*) :: CacheBuild a -> CacheBuild b -> CacheBuild a #

MonadIO CacheBuild Source # 
Instance details

Defined in Hasura.RQL.DDL.Schema.Cache.Common

Methods

liftIO :: IO a -> CacheBuild a #

MonadUnique CacheBuild Source # 
Instance details

Defined in Hasura.RQL.DDL.Schema.Cache.Common

HasHttpManagerM CacheBuild Source # 
Instance details

Defined in Hasura.RQL.DDL.Schema.Cache.Common

Methods

askHttpManager :: CacheBuild Manager Source #

HasServerConfigCtx CacheBuild Source # 
Instance details

Defined in Hasura.RQL.DDL.Schema.Cache.Common

MonadResolveSource CacheBuild Source # 
Instance details

Defined in Hasura.RQL.DDL.Schema.Cache.Common

MonadReader CacheBuildParams CacheBuild Source # 
Instance details

Defined in Hasura.RQL.DDL.Schema.Cache.Common

MonadError QErr CacheBuild Source # 
Instance details

Defined in Hasura.RQL.DDL.Schema.Cache.Common

MonadBaseControl IO CacheBuild Source # 
Instance details

Defined in Hasura.RQL.DDL.Schema.Cache.Common

Associated Types

type StM CacheBuild a

Methods

liftBaseWith :: (RunInBase CacheBuild IO -> IO a) -> CacheBuild a

restoreM :: StM CacheBuild a -> CacheBuild a

MonadBase IO CacheBuild Source # 
Instance details

Defined in Hasura.RQL.DDL.Schema.Cache.Common

Methods

liftBase :: IO α -> CacheBuild α

MonadMetadataStorageQueryAPI (MetadataStorageT (PGMetadataStorageAppT CacheBuild)) Source # 
Instance details

Defined in Hasura.App

type StM CacheBuild a Source # 
Instance details

Defined in Hasura.RQL.DDL.Schema.Cache.Common

bindErrorA :: (ArrowChoice arr, ArrowKleisli m arr, ArrowError e arr, MonadError e m) => arr (m a) a Source #

buildInfoMap :: (ArrowChoice arr, ArrowDistribute arr, ArrowWriter (Seq CollectedInfo) arr, Eq k, Hashable k) => (a -> k) -> (a -> MetadataObject) -> ((e, a) `arr` Maybe b) -> (e, [a]) `arr` HashMap k b Source #

Processes a list of catalog metadata into a map of processed information, marking any duplicate entries inconsistent.

buildInfoMapPreservingMetadata :: (ArrowChoice arr, ArrowDistribute arr, ArrowWriter (Seq CollectedInfo) arr, Eq k, Hashable k) => (a -> k) -> (a -> MetadataObject) -> ((e, a) `arr` Maybe b) -> (e, [a]) `arr` HashMap k (b, MetadataObject) Source #

Like buildInfo, but includes each processed info’s associated MetadataObject in the result. This is useful if the results will be further processed, and the MetadataObject is still needed to mark the object inconsistent.

addTableContext :: Backend b => TableName b -> Text -> Text Source #