graphql-engine-1.0.0: GraphQL API over Postgres
Safe HaskellSafe-Inferred
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

newtype BackendInvalidationKeysWrapper (b :: BackendType) Source #

Instances

Instances details
Monoid (BackendInvalidationKeys b) => Monoid (BackendInvalidationKeysWrapper b) Source # 
Instance details

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

Semigroup (BackendInvalidationKeys b) => Semigroup (BackendInvalidationKeysWrapper b) Source # 
Instance details

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

Show (BackendInvalidationKeys b) => Show (BackendInvalidationKeysWrapper b) Source # 
Instance details

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

Eq (BackendInvalidationKeys b) => Eq (BackendInvalidationKeysWrapper b) Source # 
Instance details

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

Ord (BackendInvalidationKeys b) => Ord (BackendInvalidationKeysWrapper b) Source # 
Instance details

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

Select (BackendInvalidationKeysWrapper b) Source # 
Instance details

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

Associated Types

type Selector (BackendInvalidationKeysWrapper b) :: Type -> Type Source #

type Selector (BackendInvalidationKeysWrapper b) Source # 
Instance details

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

data InvalidationKeys Source #

InvalidationKeys used to apply requested CacheInvalidations.

Instances

Instances details
Generic InvalidationKeys Source # 
Instance details

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

Associated Types

type Rep InvalidationKeys :: Type -> Type #

Show InvalidationKeys Source # 
Instance details

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

Eq InvalidationKeys Source # 
Instance details

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

Select InvalidationKeys Source # 
Instance details

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

Associated Types

type Selector InvalidationKeys :: Type -> Type Source #

type Rep InvalidationKeys Source # 
Instance details

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

type Selector InvalidationKeys Source # 
Instance details

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

data TableBuildInput b Source #

Instances

Instances details
Generic (TableBuildInput b) Source # 
Instance details

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

Associated Types

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

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

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

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

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

Methods

rnf :: TableBuildInput b -> () #

Backend b => Eq (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)) :*: S1 ('MetaSel ('Just "_tbiLogicalModel") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe LogicalModelName))))))

data NonColumnTableInputs b Source #

Instances

Instances details
Generic (NonColumnTableInputs b) Source # 
Instance details

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

Associated Types

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

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

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

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

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

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
Generic (TablePermissionInputs b) Source # 
Instance details

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

Associated Types

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

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

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

Backend b => Eq (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.

See also Note [Avoiding GraphQL schema rebuilds when changing irrelevant Metadata]

Constructors

BuildOutputs 

Fields

data CacheBuild a Source #

The monad in which @RebuildableSchemaCache is being run

Instances

Instances details
MonadIO CacheBuild Source # 
Instance details

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

Methods

liftIO :: IO a -> 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 #

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 #

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 #

HasCacheStaticConfig 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

ProvidesNetwork 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 Source #

MonadError QErr 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

MonadBase IO CacheBuild Source # 
Instance details

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

Methods

liftBase :: IO α -> CacheBuild α Source #

type StM CacheBuild a Source # 
Instance details

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

data SourcesIntrospectionStatus Source #

The status of collection of stored introspections of remote schemas and data sources.

Constructors

SourcesIntrospectionChangedFull StoredIntrospection

A full introspection collection of all available remote schemas and data sources.

SourcesIntrospectionChangedPartial StoredIntrospection

A partial introspection collection. Does not include all configured remote schemas and data sources, because they were not available.

SourcesIntrospectionUnchanged

None of remote schemas or data sources introspection is refetched.

buildInfoMap :: (ArrowChoice arr, ArrowDistribute arr, ArrowWriter (Seq CollectItem) arr, 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.

buildInfoMapM :: (MonadWriter (Seq CollectItem) m, Hashable k) => (a -> k) -> (a -> MetadataObject) -> (a -> m (Maybe b)) -> [a] -> m (HashMap k b) Source #

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

Like buildInfoMap, 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.

buildInfoMapPreservingMetadataM :: (MonadWriter (Seq CollectItem) m, Hashable k) => (a -> k) -> (a -> MetadataObject) -> (a -> m (Maybe b)) -> [a] -> m (HashMap k (b, MetadataObject)) Source #