Safe Haskell | None |
---|---|
Language | Haskell2010 |
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
- 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 #
Constructors
ComputedFieldMetadata | |
Fields |
Instances
data RemoteSchemaPermissionMetadata Source #
Constructors
RemoteSchemaPermissionMetadata | |
Fields |
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 #
Constructors
RemoteSchemaTypeRelationships | |
Fields
|
Instances
data RemoteSchemaMetadata Source #
Constructors
RemoteSchemaMetadata | |
Instances
rstrsName :: Lens' RemoteSchemaTypeRelationships Name Source #
rsmName :: Lens' RemoteSchemaMetadata RemoteSchemaName Source #
rsmComment :: Lens' RemoteSchemaMetadata (Maybe Text) Source #
data TableMetadata b Source #
Constructors
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 #
Constructors
FunctionMetadata | |
Fields
|
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.
Constructors
SourceMetadata | |
Fields |
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.
Constructors
BackendSourceMetadata | |
Instances
Eq BackendSourceMetadata Source # | |
Defined in Hasura.RQL.Types.Metadata.Common Methods (==) :: BackendSourceMetadata -> BackendSourceMetadata -> Bool # (/=) :: BackendSourceMetadata -> BackendSourceMetadata -> Bool # | |
Show BackendSourceMetadata Source # | |
Defined in Hasura.RQL.Types.Metadata.Common Methods 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. :(
Constructors
BackendConfigWrapper | |
Fields |
Instances
data CatalogStateType Source #
Constructors
CSTCli | |
CSTConsole |
Instances
Eq CatalogStateType Source # | |
Defined in Hasura.RQL.Types.Metadata.Common Methods (==) :: CatalogStateType -> CatalogStateType -> Bool # (/=) :: CatalogStateType -> CatalogStateType -> Bool # | |
Show CatalogStateType Source # | |
Defined in Hasura.RQL.Types.Metadata.Common Methods showsPrec :: Int -> CatalogStateType -> ShowS # show :: CatalogStateType -> String # showList :: [CatalogStateType] -> ShowS # | |
FromJSON CatalogStateType Source # | |
Defined in Hasura.RQL.Types.Metadata.Common Methods parseJSON :: Value -> Parser CatalogStateType parseJSONList :: Value -> Parser [CatalogStateType] | |
ToJSON CatalogStateType Source # | |
Defined in Hasura.RQL.Types.Metadata.Common Methods toJSON :: CatalogStateType -> Value toEncoding :: CatalogStateType -> Encoding toJSONList :: [CatalogStateType] -> Value toEncodingList :: [CatalogStateType] -> Encoding |
data SetCatalogState Source #
Constructors
SetCatalogState | |
Fields
|
Instances
Eq SetCatalogState Source # | |
Defined in Hasura.RQL.Types.Metadata.Common Methods (==) :: SetCatalogState -> SetCatalogState -> Bool # (/=) :: SetCatalogState -> SetCatalogState -> Bool # | |
Show SetCatalogState Source # | |
Defined in Hasura.RQL.Types.Metadata.Common Methods showsPrec :: Int -> SetCatalogState -> ShowS # show :: SetCatalogState -> String # showList :: [SetCatalogState] -> ShowS # | |
FromJSON SetCatalogState Source # | |
Defined in Hasura.RQL.Types.Metadata.Common Methods parseJSON :: Value -> Parser SetCatalogState parseJSONList :: Value -> Parser [SetCatalogState] | |
ToJSON SetCatalogState Source # | |
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
Eq CatalogState Source # | |
Defined in Hasura.RQL.Types.Metadata.Common | |
Show CatalogState Source # | |
Defined in Hasura.RQL.Types.Metadata.Common Methods showsPrec :: Int -> CatalogState -> ShowS # show :: CatalogState -> String # showList :: [CatalogState] -> ShowS # | |
ToJSON CatalogState Source # | |
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
Eq GetCatalogState Source # | |
Defined in Hasura.RQL.Types.Metadata.Common Methods (==) :: GetCatalogState -> GetCatalogState -> Bool # (/=) :: GetCatalogState -> GetCatalogState -> Bool # | |
Show GetCatalogState Source # | |
Defined in Hasura.RQL.Types.Metadata.Common Methods showsPrec :: Int -> GetCatalogState -> ShowS # show :: GetCatalogState -> String # showList :: [GetCatalogState] -> ShowS # | |
FromJSON GetCatalogState Source # | |
Defined in Hasura.RQL.Types.Metadata.Common Methods parseJSON :: Value -> Parser GetCatalogState parseJSONList :: Value -> Parser [GetCatalogState] | |
ToJSON GetCatalogState Source # | |
Defined in Hasura.RQL.Types.Metadata.Common Methods toJSON :: GetCatalogState -> Value toEncoding :: GetCatalogState -> Encoding toJSONList :: [GetCatalogState] -> Value toEncodingList :: [GetCatalogState] -> Encoding |