Safe Haskell | None |
---|---|
Language | Haskell2010 |
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
- parseListAsMap :: (Hashable k, Eq k, ToTxt k) => Text -> (a -> k) -> Parser [a] -> Parser (InsOrdHashMap k a)
- data ComputedFieldMetadata b = ComputedFieldMetadata {}
- data RemoteSchemaPermissionMetadata = RemoteSchemaPermissionMetadata {}
- rspmRole :: Lens' RemoteSchemaPermissionMetadata RoleName
- rspmDefinition :: Lens' RemoteSchemaPermissionMetadata RemoteSchemaPermissionDefinition
- rspmComment :: Lens' RemoteSchemaPermissionMetadata (Maybe Text)
- type Relationships a = InsOrdHashMap RelName a
- type ComputedFields b = InsOrdHashMap ComputedFieldName (ComputedFieldMetadata b)
- type RemoteRelationships = InsOrdHashMap RelName RemoteRelationship
- type SchemaRemoteRelationships = InsOrdHashMap Name RemoteSchemaTypeRelationships
- type Permissions a = InsOrdHashMap RoleName a
- type EventTriggers b = InsOrdHashMap TriggerName (EventTriggerConf b)
- data RemoteSchemaTypeRelationships = RemoteSchemaTypeRelationships {
- _rstrsName :: Name
- _rstrsRelationships :: RemoteRelationships
- data RemoteSchemaMetadata = RemoteSchemaMetadata {}
- rstrsRelationships :: Lens' RemoteSchemaTypeRelationships RemoteRelationships
- rstrsName :: Lens' RemoteSchemaTypeRelationships Name
- rsmRemoteRelationships :: Lens' RemoteSchemaMetadata SchemaRemoteRelationships
- rsmPermissions :: Lens' RemoteSchemaMetadata [RemoteSchemaPermissionMetadata]
- rsmName :: Lens' RemoteSchemaMetadata RemoteSchemaName
- rsmDefinition :: Lens' RemoteSchemaMetadata RemoteSchemaDef
- rsmComment :: Lens' RemoteSchemaMetadata (Maybe Text)
- data TableMetadata b = TableMetadata {
- _tmTable :: TableName b
- _tmIsEnum :: Bool
- _tmConfiguration :: TableConfig b
- _tmObjectRelationships :: Relationships (ObjRelDef b)
- _tmArrayRelationships :: Relationships (ArrRelDef b)
- _tmComputedFields :: ComputedFields b
- _tmRemoteRelationships :: RemoteRelationships
- _tmInsertPermissions :: Permissions (InsPermDef b)
- _tmSelectPermissions :: Permissions (SelPermDef b)
- _tmUpdatePermissions :: Permissions (UpdPermDef b)
- _tmDeletePermissions :: Permissions (DelPermDef b)
- _tmEventTriggers :: EventTriggers b
- _tmApolloFederationConfig :: Maybe ApolloFederationConfig
- codecNamePrefix :: forall b. HasTag b => Text
- tmUpdatePermissions :: forall b. Lens' (TableMetadata b) (Permissions (UpdPermDef b))
- tmTable :: forall b. Lens' (TableMetadata b) (TableName b)
- tmSelectPermissions :: forall b. Lens' (TableMetadata b) (Permissions (SelPermDef b))
- tmRemoteRelationships :: forall b. Lens' (TableMetadata b) RemoteRelationships
- tmObjectRelationships :: forall b. Lens' (TableMetadata b) (Relationships (ObjRelDef b))
- tmIsEnum :: forall b. Lens' (TableMetadata b) Bool
- tmInsertPermissions :: forall b. Lens' (TableMetadata b) (Permissions (InsPermDef b))
- tmEventTriggers :: forall b. Lens' (TableMetadata b) (EventTriggers b)
- tmDeletePermissions :: forall b. Lens' (TableMetadata b) (Permissions (DelPermDef b))
- tmConfiguration :: forall b. Lens' (TableMetadata b) (TableConfig b)
- tmComputedFields :: forall b. Lens' (TableMetadata b) (ComputedFields b)
- tmArrayRelationships :: forall b. Lens' (TableMetadata b) (Relationships (ArrRelDef b))
- tmApolloFederationConfig :: forall b. Lens' (TableMetadata b) (Maybe ApolloFederationConfig)
- mkTableMeta :: TableName b -> Bool -> TableConfig b -> TableMetadata b
- data FunctionMetadata b = FunctionMetadata {}
- fmPermissions :: forall b. Lens' (FunctionMetadata b) [FunctionPermissionInfo]
- fmFunction :: forall b b. Lens (FunctionMetadata b) (FunctionMetadata b) (FunctionName b) (FunctionName b)
- fmConfiguration :: forall b. Lens' (FunctionMetadata b) FunctionConfig
- fmComment :: forall b. Lens' (FunctionMetadata b) (Maybe Text)
- type Tables b = InsOrdHashMap (TableName b) (TableMetadata b)
- type Functions b = InsOrdHashMap (FunctionName b) (FunctionMetadata b)
- type RemoteSchemas = InsOrdHashMap RemoteSchemaName RemoteSchemaMetadata
- type Endpoints = InsOrdHashMap EndpointName CreateEndpoint
- type Actions = InsOrdHashMap ActionName ActionMetadata
- type CronTriggers = InsOrdHashMap TriggerName CronTriggerMetadata
- type InheritedRoles = InsOrdHashMap RoleName InheritedRole
- data SourceMetadata b = SourceMetadata {}
- smTables :: forall b. Lens' (SourceMetadata b) (Tables b)
- smQueryTags :: forall b. Lens' (SourceMetadata b) (Maybe QueryTagsConfig)
- smName :: forall b. Lens' (SourceMetadata b) SourceName
- smKind :: forall b. Lens' (SourceMetadata b) (BackendSourceKind b)
- smFunctions :: forall b. Lens' (SourceMetadata b) (Functions b)
- smCustomization :: forall b. Lens' (SourceMetadata b) SourceCustomization
- smConfiguration :: forall b. Lens' (SourceMetadata b) (SourceConnConfiguration b)
- backendSourceMetadataCodec :: JSONCodec BackendSourceMetadata
- anySourceMetadataCodec :: HasTag b => JSONCodec (SourceMetadata b) -> JSONCodec BackendSourceMetadata
- mkSourceMetadata :: forall (b :: BackendType). Backend b => SourceName -> BackendSourceKind b -> SourceConnConfiguration b -> SourceCustomization -> BackendSourceMetadata
- newtype BackendSourceMetadata = BackendSourceMetadata {}
- toSourceMetadata :: forall b. Backend b => Prism' BackendSourceMetadata (SourceMetadata b)
- getSourceName :: BackendSourceMetadata -> SourceName
- type Sources = InsOrdHashMap SourceName BackendSourceMetadata
- sourcesCodec :: JSONCodec Sources
- parseNonSourcesMetadata :: Object -> Parser (RemoteSchemas, QueryCollections, MetadataAllowlist, CustomTypes, Actions, CronTriggers, ApiLimit, MetricsConfig, InheritedRoles, SetGraphqlIntrospectionOptions)
- newtype BackendConfigWrapper b = BackendConfigWrapper {}
- data CatalogStateType
- = CSTCli
- | CSTConsole
- data SetCatalogState = SetCatalogState {
- _scsType :: CatalogStateType
- _scsState :: Value
- data CatalogState = CatalogState {
- _csId :: Text
- _csCliState :: Value
- _csConsoleState :: Value
- data GetCatalogState = GetCatalogState
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
data RemoteSchemaPermissionMetadata Source #
Instances
rspmComment :: Lens' RemoteSchemaPermissionMetadata (Maybe Text) Source #
type Relationships a = InsOrdHashMap RelName a Source #
type ComputedFields b = InsOrdHashMap ComputedFieldName (ComputedFieldMetadata b) Source #
type RemoteRelationships = InsOrdHashMap RelName RemoteRelationship Source #
type SchemaRemoteRelationships = InsOrdHashMap Name RemoteSchemaTypeRelationships Source #
type Permissions a = InsOrdHashMap RoleName a Source #
type EventTriggers b = InsOrdHashMap TriggerName (EventTriggerConf b) Source #
data RemoteSchemaTypeRelationships Source #
Instances
data RemoteSchemaMetadata Source #
Instances
rstrsName :: Lens' RemoteSchemaTypeRelationships Name Source #
rsmName :: Lens' RemoteSchemaMetadata RemoteSchemaName Source #
rsmComment :: Lens' RemoteSchemaMetadata (Maybe Text) Source #
data TableMetadata b Source #
Instances
codecNamePrefix :: forall b. HasTag b => Text Source #
tmUpdatePermissions :: forall b. Lens' (TableMetadata b) (Permissions (UpdPermDef b)) Source #
tmTable :: forall b. Lens' (TableMetadata b) (TableName b) Source #
tmSelectPermissions :: forall b. Lens' (TableMetadata b) (Permissions (SelPermDef b)) Source #
tmRemoteRelationships :: forall b. Lens' (TableMetadata b) RemoteRelationships Source #
tmObjectRelationships :: forall b. Lens' (TableMetadata b) (Relationships (ObjRelDef b)) Source #
tmIsEnum :: forall b. Lens' (TableMetadata b) Bool Source #
tmInsertPermissions :: forall b. Lens' (TableMetadata b) (Permissions (InsPermDef b)) Source #
tmEventTriggers :: forall b. Lens' (TableMetadata b) (EventTriggers b) Source #
tmDeletePermissions :: forall b. Lens' (TableMetadata b) (Permissions (DelPermDef b)) Source #
tmConfiguration :: forall b. Lens' (TableMetadata b) (TableConfig b) Source #
tmComputedFields :: forall b. Lens' (TableMetadata b) (ComputedFields b) Source #
tmArrayRelationships :: forall b. Lens' (TableMetadata b) (Relationships (ArrRelDef b)) Source #
tmApolloFederationConfig :: forall b. Lens' (TableMetadata b) (Maybe ApolloFederationConfig) Source #
mkTableMeta :: TableName b -> Bool -> TableConfig b -> TableMetadata b Source #
data FunctionMetadata b Source #
FunctionMetadata | |
|
Instances
fmPermissions :: forall b. Lens' (FunctionMetadata b) [FunctionPermissionInfo] Source #
fmFunction :: forall b b. Lens (FunctionMetadata b) (FunctionMetadata b) (FunctionName b) (FunctionName b) Source #
fmConfiguration :: forall b. Lens' (FunctionMetadata b) FunctionConfig Source #
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 #
type RemoteSchemas = InsOrdHashMap RemoteSchemaName RemoteSchemaMetadata Source #
type Endpoints = InsOrdHashMap EndpointName CreateEndpoint Source #
type Actions = InsOrdHashMap ActionName ActionMetadata Source #
type CronTriggers = InsOrdHashMap TriggerName CronTriggerMetadata Source #
type InheritedRoles = InsOrdHashMap RoleName InheritedRole Source #
data SourceMetadata b Source #
Source configuration for a source of backend type b
as stored in the Metadata DB.
Instances
smTables :: forall b. Lens' (SourceMetadata b) (Tables b) Source #
smQueryTags :: forall b. Lens' (SourceMetadata b) (Maybe QueryTagsConfig) 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 #
smCustomization :: forall b. Lens' (SourceMetadata b) SourceCustomization Source #
smConfiguration :: forall b. Lens' (SourceMetadata b) (SourceConnConfiguration b) Source #
backendSourceMetadataCodec :: JSONCodec BackendSourceMetadata Source #
anySourceMetadataCodec :: HasTag b => JSONCodec (SourceMetadata b) -> JSONCodec BackendSourceMetadata Source #
mkSourceMetadata :: forall (b :: BackendType). Backend b => SourceName -> BackendSourceKind b -> SourceConnConfiguration b -> SourceCustomization -> BackendSourceMetadata Source #
newtype BackendSourceMetadata Source #
Source configuration as stored in the Metadata DB for some existentialized backend.
Instances
Eq BackendSourceMetadata Source # | |
Defined in Hasura.RQL.Types.Metadata.Common (==) :: BackendSourceMetadata -> BackendSourceMetadata -> Bool # (/=) :: BackendSourceMetadata -> BackendSourceMetadata -> Bool # | |
Show BackendSourceMetadata Source # | |
Defined in Hasura.RQL.Types.Metadata.Common showsPrec :: Int -> BackendSourceMetadata -> ShowS # show :: BackendSourceMetadata -> String # showList :: [BackendSourceMetadata] -> ShowS # |
toSourceMetadata :: forall b. Backend b => Prism' BackendSourceMetadata (SourceMetadata b) Source #
type Sources = InsOrdHashMap SourceName BackendSourceMetadata Source #
sourcesCodec :: JSONCodec Sources Source #
parseNonSourcesMetadata :: Object -> Parser (RemoteSchemas, QueryCollections, MetadataAllowlist, CustomTypes, Actions, CronTriggers, ApiLimit, MetricsConfig, InheritedRoles, SetGraphqlIntrospectionOptions) Source #
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
data CatalogStateType Source #
Instances
Eq CatalogStateType Source # | |
Defined in Hasura.RQL.Types.Metadata.Common (==) :: CatalogStateType -> CatalogStateType -> Bool # (/=) :: CatalogStateType -> CatalogStateType -> Bool # | |
Show CatalogStateType Source # | |
Defined in Hasura.RQL.Types.Metadata.Common showsPrec :: Int -> CatalogStateType -> ShowS # show :: CatalogStateType -> String # showList :: [CatalogStateType] -> ShowS # | |
FromJSON CatalogStateType Source # | |
Defined in Hasura.RQL.Types.Metadata.Common parseJSON :: Value -> Parser CatalogStateType parseJSONList :: Value -> Parser [CatalogStateType] | |
ToJSON CatalogStateType Source # | |
Defined in Hasura.RQL.Types.Metadata.Common toJSON :: CatalogStateType -> Value toEncoding :: CatalogStateType -> Encoding toJSONList :: [CatalogStateType] -> Value toEncodingList :: [CatalogStateType] -> Encoding |
data SetCatalogState Source #
SetCatalogState | |
|
Instances
Eq SetCatalogState Source # | |
Defined in Hasura.RQL.Types.Metadata.Common (==) :: SetCatalogState -> SetCatalogState -> Bool # (/=) :: SetCatalogState -> SetCatalogState -> Bool # | |
Show SetCatalogState Source # | |
Defined in Hasura.RQL.Types.Metadata.Common showsPrec :: Int -> SetCatalogState -> ShowS # show :: SetCatalogState -> String # showList :: [SetCatalogState] -> ShowS # | |
FromJSON SetCatalogState Source # | |
Defined in Hasura.RQL.Types.Metadata.Common parseJSON :: Value -> Parser SetCatalogState parseJSONList :: Value -> Parser [SetCatalogState] | |
ToJSON SetCatalogState Source # | |
Defined in Hasura.RQL.Types.Metadata.Common toJSON :: SetCatalogState -> Value toEncoding :: SetCatalogState -> Encoding toJSONList :: [SetCatalogState] -> Value toEncodingList :: [SetCatalogState] -> Encoding |
data CatalogState Source #
CatalogState | |
|
Instances
Eq CatalogState Source # | |
Defined in Hasura.RQL.Types.Metadata.Common (==) :: CatalogState -> CatalogState -> Bool # (/=) :: CatalogState -> CatalogState -> Bool # | |
Show CatalogState Source # | |
Defined in Hasura.RQL.Types.Metadata.Common showsPrec :: Int -> CatalogState -> ShowS # show :: CatalogState -> String # showList :: [CatalogState] -> ShowS # | |
ToJSON CatalogState Source # | |
Defined in Hasura.RQL.Types.Metadata.Common toJSON :: CatalogState -> Value toEncoding :: CatalogState -> Encoding toJSONList :: [CatalogState] -> Value toEncodingList :: [CatalogState] -> Encoding |
data GetCatalogState Source #
Instances
Eq GetCatalogState Source # | |
Defined in Hasura.RQL.Types.Metadata.Common (==) :: GetCatalogState -> GetCatalogState -> Bool # (/=) :: GetCatalogState -> GetCatalogState -> Bool # | |
Show GetCatalogState Source # | |
Defined in Hasura.RQL.Types.Metadata.Common showsPrec :: Int -> GetCatalogState -> ShowS # show :: GetCatalogState -> String # showList :: [GetCatalogState] -> ShowS # | |
FromJSON GetCatalogState Source # | |
Defined in Hasura.RQL.Types.Metadata.Common parseJSON :: Value -> Parser GetCatalogState parseJSONList :: Value -> Parser [GetCatalogState] | |
ToJSON GetCatalogState Source # | |
Defined in Hasura.RQL.Types.Metadata.Common toJSON :: GetCatalogState -> Value toEncoding :: GetCatalogState -> Encoding toJSONList :: [GetCatalogState] -> Value toEncodingList :: [GetCatalogState] -> Encoding |