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

Hasura.RQL.Types.Metadata.Common

Description

In order to avoid circular dependencies while splitting Metadata into multiple modules, some definitions must be moved out of that module. This module is the bucket for definitions that have not been specifically moved elsewhere.

Synopsis

Documentation

parseListAsMap :: (Hashable k, Eq k, ToTxt k) => Text -> (a -> k) -> Parser [a] -> Parser (InsOrdHashMap k a) Source #

Parse a list of objects into a map from a derived key, failing if the list has duplicates.

data ComputedFieldMetadata b Source #

Instances

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

Defined in Hasura.RQL.Types.Metadata.Common

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

Defined in Hasura.RQL.Types.Metadata.Common

Generic (ComputedFieldMetadata b) Source # 
Instance details

Defined in Hasura.RQL.Types.Metadata.Common

Associated Types

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

Backend b => FromJSON (ComputedFieldMetadata b) Source # 
Instance details

Defined in Hasura.RQL.Types.Metadata.Common

Methods

parseJSON :: Value -> Parser (ComputedFieldMetadata b)

parseJSONList :: Value -> Parser [ComputedFieldMetadata b]

Backend b => ToJSON (ComputedFieldMetadata b) Source # 
Instance details

Defined in Hasura.RQL.Types.Metadata.Common

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

Defined in Hasura.RQL.Types.Metadata.Common

type Rep (ComputedFieldMetadata b) Source # 
Instance details

Defined in Hasura.RQL.Types.Metadata.Common

type Rep (ComputedFieldMetadata b) = D1 ('MetaData "ComputedFieldMetadata" "Hasura.RQL.Types.Metadata.Common" "graphql-engine-1.0.0-inplace" 'False) (C1 ('MetaCons "ComputedFieldMetadata" 'PrefixI 'True) (S1 ('MetaSel ('Just "_cfmName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 ComputedFieldName) :*: (S1 ('MetaSel ('Just "_cfmDefinition") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (ComputedFieldDefinition b)) :*: S1 ('MetaSel ('Just "_cfmComment") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Comment))))

data RemoteSchemaPermissionMetadata Source #

Instances

Instances details
Eq RemoteSchemaPermissionMetadata Source # 
Instance details

Defined in Hasura.RQL.Types.Metadata.Common

Show RemoteSchemaPermissionMetadata Source # 
Instance details

Defined in Hasura.RQL.Types.Metadata.Common

Generic RemoteSchemaPermissionMetadata Source # 
Instance details

Defined in Hasura.RQL.Types.Metadata.Common

Associated Types

type Rep RemoteSchemaPermissionMetadata :: Type -> Type #

FromJSON RemoteSchemaPermissionMetadata Source # 
Instance details

Defined in Hasura.RQL.Types.Metadata.Common

ToJSON RemoteSchemaPermissionMetadata Source # 
Instance details

Defined in Hasura.RQL.Types.Metadata.Common

Cacheable RemoteSchemaPermissionMetadata Source # 
Instance details

Defined in Hasura.RQL.Types.Metadata.Common

type Rep RemoteSchemaPermissionMetadata Source # 
Instance details

Defined in Hasura.RQL.Types.Metadata.Common

type Rep RemoteSchemaPermissionMetadata = D1 ('MetaData "RemoteSchemaPermissionMetadata" "Hasura.RQL.Types.Metadata.Common" "graphql-engine-1.0.0-inplace" 'False) (C1 ('MetaCons "RemoteSchemaPermissionMetadata" 'PrefixI 'True) (S1 ('MetaSel ('Just "_rspmRole") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 RoleName) :*: (S1 ('MetaSel ('Just "_rspmDefinition") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 RemoteSchemaPermissionDefinition) :*: S1 ('MetaSel ('Just "_rspmComment") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)))))

type Relationships a = InsOrdHashMap RelName a Source #

type Permissions a = InsOrdHashMap RoleName a Source #

data RemoteSchemaTypeRelationships Source #

Instances

Instances details
Eq RemoteSchemaTypeRelationships Source # 
Instance details

Defined in Hasura.RQL.Types.Metadata.Common

Show RemoteSchemaTypeRelationships Source # 
Instance details

Defined in Hasura.RQL.Types.Metadata.Common

Generic RemoteSchemaTypeRelationships Source # 
Instance details

Defined in Hasura.RQL.Types.Metadata.Common

Associated Types

type Rep RemoteSchemaTypeRelationships :: Type -> Type #

FromJSON RemoteSchemaTypeRelationships Source # 
Instance details

Defined in Hasura.RQL.Types.Metadata.Common

ToJSON RemoteSchemaTypeRelationships Source # 
Instance details

Defined in Hasura.RQL.Types.Metadata.Common

Cacheable RemoteSchemaTypeRelationships Source # 
Instance details

Defined in Hasura.RQL.Types.Metadata.Common

type Rep RemoteSchemaTypeRelationships Source # 
Instance details

Defined in Hasura.RQL.Types.Metadata.Common

data RemoteSchemaMetadata Source #

Instances

Instances details
Eq RemoteSchemaMetadata Source # 
Instance details

Defined in Hasura.RQL.Types.Metadata.Common

Show RemoteSchemaMetadata Source # 
Instance details

Defined in Hasura.RQL.Types.Metadata.Common

Generic RemoteSchemaMetadata Source # 
Instance details

Defined in Hasura.RQL.Types.Metadata.Common

Associated Types

type Rep RemoteSchemaMetadata :: Type -> Type #

FromJSON RemoteSchemaMetadata Source # 
Instance details

Defined in Hasura.RQL.Types.Metadata.Common

Methods

parseJSON :: Value -> Parser RemoteSchemaMetadata

parseJSONList :: Value -> Parser [RemoteSchemaMetadata]

ToJSON RemoteSchemaMetadata Source # 
Instance details

Defined in Hasura.RQL.Types.Metadata.Common

Cacheable RemoteSchemaMetadata Source # 
Instance details

Defined in Hasura.RQL.Types.Metadata.Common

type Rep RemoteSchemaMetadata Source # 
Instance details

Defined in Hasura.RQL.Types.Metadata.Common

type Rep RemoteSchemaMetadata = D1 ('MetaData "RemoteSchemaMetadata" "Hasura.RQL.Types.Metadata.Common" "graphql-engine-1.0.0-inplace" 'False) (C1 ('MetaCons "RemoteSchemaMetadata" 'PrefixI 'True) ((S1 ('MetaSel ('Just "_rsmName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 RemoteSchemaName) :*: S1 ('MetaSel ('Just "_rsmDefinition") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 RemoteSchemaDef)) :*: (S1 ('MetaSel ('Just "_rsmComment") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "_rsmPermissions") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [RemoteSchemaPermissionMetadata]) :*: S1 ('MetaSel ('Just "_rsmRemoteRelationships") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 SchemaRemoteRelationships)))))

data TableMetadata b Source #

Instances

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

Defined in Hasura.RQL.Types.Metadata.Common

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

Defined in Hasura.RQL.Types.Metadata.Common

Generic (TableMetadata b) Source # 
Instance details

Defined in Hasura.RQL.Types.Metadata.Common

Associated Types

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

Backend b => HasCodec (TableMetadata b) Source # 
Instance details

Defined in Hasura.RQL.Types.Metadata.Common

Methods

codec :: JSONCodec (TableMetadata b)

listCodecForStringCompatibility :: JSONCodec [TableMetadata b]

Backend b => FromJSON (TableMetadata b) Source # 
Instance details

Defined in Hasura.RQL.Types.Metadata.Common

Methods

parseJSON :: Value -> Parser (TableMetadata b)

parseJSONList :: Value -> Parser [TableMetadata b]

Backend b => ToJSON (TableMetadata b) Source # 
Instance details

Defined in Hasura.RQL.Types.Metadata.Common

Methods

toJSON :: TableMetadata b -> Value

toEncoding :: TableMetadata b -> Encoding

toJSONList :: [TableMetadata b] -> Value

toEncodingList :: [TableMetadata b] -> Encoding

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

Defined in Hasura.RQL.Types.Metadata.Common

type Rep (TableMetadata b) Source # 
Instance details

Defined in Hasura.RQL.Types.Metadata.Common

codecNamePrefix :: forall b. HasTag b => Text Source #

tmTable :: forall b. Lens' (TableMetadata b) (TableName b) Source #

tmIsEnum :: forall b. Lens' (TableMetadata b) Bool Source #

tmConfiguration :: forall b. Lens' (TableMetadata b) (TableConfig b) Source #

data FunctionMetadata b Source #

Instances

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

Defined in Hasura.RQL.Types.Metadata.Common

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

Defined in Hasura.RQL.Types.Metadata.Common

Generic (FunctionMetadata b) Source # 
Instance details

Defined in Hasura.RQL.Types.Metadata.Common

Associated Types

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

Backend b => HasCodec (FunctionMetadata b) Source # 
Instance details

Defined in Hasura.RQL.Types.Metadata.Common

Backend b => FromJSON (FunctionMetadata b) Source # 
Instance details

Defined in Hasura.RQL.Types.Metadata.Common

Methods

parseJSON :: Value -> Parser (FunctionMetadata b)

parseJSONList :: Value -> Parser [FunctionMetadata b]

Backend b => ToJSON (FunctionMetadata b) Source # 
Instance details

Defined in Hasura.RQL.Types.Metadata.Common

Methods

toJSON :: FunctionMetadata b -> Value

toEncoding :: FunctionMetadata b -> Encoding

toJSONList :: [FunctionMetadata b] -> Value

toEncodingList :: [FunctionMetadata b] -> Encoding

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

Defined in Hasura.RQL.Types.Metadata.Common

type Rep (FunctionMetadata b) Source # 
Instance details

Defined in Hasura.RQL.Types.Metadata.Common

type Rep (FunctionMetadata b) = D1 ('MetaData "FunctionMetadata" "Hasura.RQL.Types.Metadata.Common" "graphql-engine-1.0.0-inplace" 'False) (C1 ('MetaCons "FunctionMetadata" 'PrefixI 'True) ((S1 ('MetaSel ('Just "_fmFunction") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (FunctionName b)) :*: S1 ('MetaSel ('Just "_fmConfiguration") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 FunctionConfig)) :*: (S1 ('MetaSel ('Just "_fmPermissions") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [FunctionPermissionInfo]) :*: S1 ('MetaSel ('Just "_fmComment") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)))))

fmComment :: forall b. Lens' (FunctionMetadata b) (Maybe Text) Source #

type Tables b = InsOrdHashMap (TableName b) (TableMetadata b) Source #

type Functions b = InsOrdHashMap (FunctionName b) (FunctionMetadata b) Source #

data SourceMetadata b Source #

Source configuration for a source of backend type b as stored in the Metadata DB.

Instances

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

Defined in Hasura.RQL.Types.Metadata.Common

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

Defined in Hasura.RQL.Types.Metadata.Common

Generic (SourceMetadata b) Source # 
Instance details

Defined in Hasura.RQL.Types.Metadata.Common

Associated Types

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

Backend b => HasCodec (SourceMetadata b) Source # 
Instance details

Defined in Hasura.RQL.Types.Metadata.Common

Methods

codec :: JSONCodec (SourceMetadata b)

listCodecForStringCompatibility :: JSONCodec [SourceMetadata b]

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

Defined in Hasura.RQL.Types.Metadata.Common

Backend b => FromJSONWithContext (BackendSourceKind b) (SourceMetadata b) Source # 
Instance details

Defined in Hasura.RQL.Types.Metadata.Common

Methods

parseJSONWithContext :: BackendSourceKind b -> Value -> Parser (SourceMetadata b) Source #

type Rep (SourceMetadata b) Source # 
Instance details

Defined in Hasura.RQL.Types.Metadata.Common

smTables :: forall b. Lens' (SourceMetadata b) (Tables b) Source #

smName :: forall b. Lens' (SourceMetadata b) SourceName Source #

smKind :: forall b. Lens' (SourceMetadata b) (BackendSourceKind b) Source #

smFunctions :: forall b. Lens' (SourceMetadata b) (Functions b) Source #

newtype BackendSourceMetadata Source #

Source configuration as stored in the Metadata DB for some existentialized backend.

newtype BackendConfigWrapper b Source #

This newtype simply wraps the BackendConfig type family so that it can be used with BackendMap in the Metadata type. GHC will not allow the type family to be used directly. :(

Instances

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

Defined in Hasura.RQL.Types.Metadata.Common

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

Defined in Hasura.RQL.Types.Metadata.Common

Semigroup (BackendConfig b) => Semigroup (BackendConfigWrapper b) Source # 
Instance details

Defined in Hasura.RQL.Types.Metadata.Common

Monoid (BackendConfig b) => Monoid (BackendConfigWrapper b) Source # 
Instance details

Defined in Hasura.RQL.Types.Metadata.Common

Backend b => FromJSON (BackendConfigWrapper b) Source # 
Instance details

Defined in Hasura.RQL.Types.Metadata.Common

Methods

parseJSON :: Value -> Parser (BackendConfigWrapper b)

parseJSONList :: Value -> Parser [BackendConfigWrapper b]

Backend b => ToJSON (BackendConfigWrapper b) Source # 
Instance details

Defined in Hasura.RQL.Types.Metadata.Common

data SetCatalogState Source #

Constructors

SetCatalogState 

Fields

Instances

Instances details
Eq SetCatalogState Source # 
Instance details

Defined in Hasura.RQL.Types.Metadata.Common

Show SetCatalogState Source # 
Instance details

Defined in Hasura.RQL.Types.Metadata.Common

FromJSON SetCatalogState Source # 
Instance details

Defined in Hasura.RQL.Types.Metadata.Common

Methods

parseJSON :: Value -> Parser SetCatalogState

parseJSONList :: Value -> Parser [SetCatalogState]

ToJSON SetCatalogState Source # 
Instance details

Defined in Hasura.RQL.Types.Metadata.Common

Methods

toJSON :: SetCatalogState -> Value

toEncoding :: SetCatalogState -> Encoding

toJSONList :: [SetCatalogState] -> Value

toEncodingList :: [SetCatalogState] -> Encoding

data CatalogState Source #

Constructors

CatalogState 

Fields

Instances

Instances details
Eq CatalogState Source # 
Instance details

Defined in Hasura.RQL.Types.Metadata.Common

Show CatalogState Source # 
Instance details

Defined in Hasura.RQL.Types.Metadata.Common

ToJSON CatalogState Source # 
Instance details

Defined in Hasura.RQL.Types.Metadata.Common

Methods

toJSON :: CatalogState -> Value

toEncoding :: CatalogState -> Encoding

toJSONList :: [CatalogState] -> Value

toEncodingList :: [CatalogState] -> Encoding

data GetCatalogState Source #

Constructors

GetCatalogState 

Instances

Instances details
Eq GetCatalogState Source # 
Instance details

Defined in Hasura.RQL.Types.Metadata.Common

Show GetCatalogState Source # 
Instance details

Defined in Hasura.RQL.Types.Metadata.Common

FromJSON GetCatalogState Source # 
Instance details

Defined in Hasura.RQL.Types.Metadata.Common

Methods

parseJSON :: Value -> Parser GetCatalogState

parseJSONList :: Value -> Parser [GetCatalogState]

ToJSON GetCatalogState Source # 
Instance details

Defined in Hasura.RQL.Types.Metadata.Common

Methods

toJSON :: GetCatalogState -> Value

toEncoding :: GetCatalogState -> Encoding

toJSONList :: [GetCatalogState] -> Value

toEncodingList :: [GetCatalogState] -> Encoding