mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-24 07:52:14 +03:00
769c25c7f3
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8189 GitOrigin-RevId: f82dbeaef8bd88ac2065e43661bb1480b340fea1
191 lines
7.8 KiB
Haskell
191 lines
7.8 KiB
Haskell
module Hasura.Server.API.Metadata
|
|
( RQLMetadataV1 (..),
|
|
)
|
|
where
|
|
|
|
import Hasura.LogicalModel.API qualified as LogicalModels
|
|
import Hasura.RQL.DDL.Action
|
|
import Hasura.RQL.DDL.ComputedField
|
|
import Hasura.RQL.DDL.ConnectionTemplate
|
|
import Hasura.RQL.DDL.DataConnector
|
|
import Hasura.RQL.DDL.EventTrigger
|
|
import Hasura.RQL.DDL.FeatureFlag
|
|
import Hasura.RQL.DDL.Metadata
|
|
import Hasura.RQL.DDL.Permission
|
|
import Hasura.RQL.DDL.QueryTags
|
|
import Hasura.RQL.DDL.Relationship
|
|
import Hasura.RQL.DDL.Relationship.Rename
|
|
import Hasura.RQL.DDL.Relationship.Suggest
|
|
import Hasura.RQL.DDL.RemoteRelationship
|
|
import Hasura.RQL.DDL.Schema
|
|
import Hasura.RQL.DDL.Schema.Source
|
|
import Hasura.RQL.DDL.SourceKinds
|
|
import Hasura.RQL.DDL.Webhook.Transform.Validation
|
|
import Hasura.RQL.Types.Allowlist
|
|
import Hasura.RQL.Types.ApiLimit
|
|
import Hasura.RQL.Types.Common
|
|
import Hasura.RQL.Types.CustomTypes
|
|
import Hasura.RQL.Types.Endpoint
|
|
import Hasura.RQL.Types.EventTrigger
|
|
import Hasura.RQL.Types.GraphqlSchemaIntrospection
|
|
import Hasura.RQL.Types.Metadata
|
|
import Hasura.RQL.Types.Network
|
|
import Hasura.RQL.Types.OpenTelemetry
|
|
import Hasura.RQL.Types.QueryCollection
|
|
import Hasura.RQL.Types.Roles
|
|
import Hasura.RQL.Types.ScheduledTrigger
|
|
import Hasura.RemoteSchema.MetadataAPI
|
|
import Hasura.SQL.AnyBackend
|
|
|
|
data RQLMetadataV1
|
|
= -- Sources
|
|
RMAddSource !(AnyBackend AddSource)
|
|
| RMDropSource DropSource
|
|
| RMRenameSource !RenameSource
|
|
| RMUpdateSource !(AnyBackend UpdateSource)
|
|
| RMListSourceKinds !ListSourceKinds
|
|
| RMGetSourceKindCapabilities !GetSourceKindCapabilities
|
|
| RMGetSourceTables !GetSourceTables
|
|
| RMGetTableInfo !GetTableInfo
|
|
| -- Tables
|
|
RMTrackTable !(AnyBackend TrackTableV2)
|
|
| RMUntrackTable !(AnyBackend UntrackTable)
|
|
| RMSetTableCustomization !(AnyBackend SetTableCustomization)
|
|
| RMSetApolloFederationConfig (AnyBackend SetApolloFederationConfig)
|
|
| -- Tables (PG-specific)
|
|
RMPgSetTableIsEnum !(AnyBackend SetTableIsEnum)
|
|
| -- Tables permissions
|
|
RMCreateInsertPermission !(AnyBackend (CreatePerm InsPerm))
|
|
| RMCreateSelectPermission !(AnyBackend (CreatePerm SelPerm))
|
|
| RMCreateUpdatePermission !(AnyBackend (CreatePerm UpdPerm))
|
|
| RMCreateDeletePermission !(AnyBackend (CreatePerm DelPerm))
|
|
| RMDropInsertPermission !(AnyBackend DropPerm)
|
|
| RMDropSelectPermission !(AnyBackend DropPerm)
|
|
| RMDropUpdatePermission !(AnyBackend DropPerm)
|
|
| RMDropDeletePermission !(AnyBackend DropPerm)
|
|
| RMSetPermissionComment !(AnyBackend SetPermComment)
|
|
| -- Tables relationships
|
|
RMCreateObjectRelationship !(AnyBackend CreateObjRel)
|
|
| RMCreateArrayRelationship !(AnyBackend CreateArrRel)
|
|
| RMDropRelationship !(AnyBackend DropRel)
|
|
| RMSetRelationshipComment !(AnyBackend SetRelComment)
|
|
| RMRenameRelationship !(AnyBackend RenameRel)
|
|
| RMSuggestRelationships !(AnyBackend SuggestRels)
|
|
| -- Tables remote relationships
|
|
RMCreateRemoteRelationship !(AnyBackend CreateFromSourceRelationship)
|
|
| RMUpdateRemoteRelationship !(AnyBackend CreateFromSourceRelationship)
|
|
| RMDeleteRemoteRelationship !(AnyBackend DeleteFromSourceRelationship)
|
|
| -- Functions
|
|
RMTrackFunction !(AnyBackend TrackFunctionV2)
|
|
| RMUntrackFunction !(AnyBackend UnTrackFunction)
|
|
| RMSetFunctionCustomization (AnyBackend SetFunctionCustomization)
|
|
| -- Functions permissions
|
|
RMCreateFunctionPermission !(AnyBackend FunctionPermissionArgument)
|
|
| RMDropFunctionPermission !(AnyBackend FunctionPermissionArgument)
|
|
| -- Computed fields
|
|
RMAddComputedField !(AnyBackend AddComputedField)
|
|
| RMDropComputedField !(AnyBackend DropComputedField)
|
|
| -- Connection template
|
|
RMTestConnectionTemplate !(AnyBackend TestConnectionTemplate)
|
|
| -- Logical Models
|
|
RMGetLogicalModel !(AnyBackend LogicalModels.GetLogicalModel)
|
|
| RMTrackLogicalModel !(AnyBackend LogicalModels.TrackLogicalModel)
|
|
| RMUntrackLogicalModel !(AnyBackend LogicalModels.UntrackLogicalModel)
|
|
| RMCreateSelectLogicalModelPermission !(AnyBackend (LogicalModels.CreateLogicalModelPermission SelPerm))
|
|
| RMDropSelectLogicalModelPermission !(AnyBackend LogicalModels.DropLogicalModelPermission)
|
|
| -- Tables event triggers
|
|
RMCreateEventTrigger !(AnyBackend (Unvalidated1 CreateEventTriggerQuery))
|
|
| RMDeleteEventTrigger !(AnyBackend DeleteEventTriggerQuery)
|
|
| RMRedeliverEvent !(AnyBackend RedeliverEventQuery)
|
|
| RMInvokeEventTrigger !(AnyBackend InvokeEventTriggerQuery)
|
|
| RMCleanupEventTriggerLog !TriggerLogCleanupConfig
|
|
| RMResumeEventTriggerCleanup !TriggerLogCleanupToggleConfig
|
|
| RMPauseEventTriggerCleanup !TriggerLogCleanupToggleConfig
|
|
| -- Remote schemas
|
|
RMAddRemoteSchema !AddRemoteSchemaQuery
|
|
| RMUpdateRemoteSchema !AddRemoteSchemaQuery
|
|
| RMRemoveRemoteSchema !RemoteSchemaNameQuery
|
|
| RMReloadRemoteSchema !RemoteSchemaNameQuery
|
|
| RMIntrospectRemoteSchema !RemoteSchemaNameQuery
|
|
| -- Remote schemas permissions
|
|
RMAddRemoteSchemaPermissions !AddRemoteSchemaPermission
|
|
| RMDropRemoteSchemaPermissions !DropRemoteSchemaPermissions
|
|
| -- Remote Schema remote relationships
|
|
RMCreateRemoteSchemaRemoteRelationship CreateRemoteSchemaRemoteRelationship
|
|
| RMUpdateRemoteSchemaRemoteRelationship CreateRemoteSchemaRemoteRelationship
|
|
| RMDeleteRemoteSchemaRemoteRelationship DeleteRemoteSchemaRemoteRelationship
|
|
| -- Scheduled triggers
|
|
RMCreateCronTrigger !(Unvalidated CreateCronTrigger)
|
|
| RMDeleteCronTrigger !ScheduledTriggerName
|
|
| RMCreateScheduledEvent !CreateScheduledEvent
|
|
| RMDeleteScheduledEvent !DeleteScheduledEvent
|
|
| RMGetScheduledEvents !GetScheduledEvents
|
|
| RMGetScheduledEventInvocations !GetScheduledEventInvocations
|
|
| RMGetCronTriggers
|
|
| -- Actions
|
|
RMCreateAction !(Unvalidated CreateAction)
|
|
| RMDropAction !DropAction
|
|
| RMUpdateAction !(Unvalidated UpdateAction)
|
|
| RMCreateActionPermission !CreateActionPermission
|
|
| RMDropActionPermission !DropActionPermission
|
|
| -- Query collections, allow list related
|
|
RMCreateQueryCollection !CreateCollection
|
|
| RMRenameQueryCollection !RenameCollection
|
|
| RMDropQueryCollection !DropCollection
|
|
| RMAddQueryToCollection !AddQueryToCollection
|
|
| RMDropQueryFromCollection !DropQueryFromCollection
|
|
| RMAddCollectionToAllowlist !AllowlistEntry
|
|
| RMDropCollectionFromAllowlist !DropCollectionFromAllowlist
|
|
| RMUpdateScopeOfCollectionInAllowlist !UpdateScopeOfCollectionInAllowlist
|
|
| -- Rest endpoints
|
|
RMCreateRestEndpoint !CreateEndpoint
|
|
| RMDropRestEndpoint !DropEndpoint
|
|
| -- GraphQL Data Connectors
|
|
RMDCAddAgent !DCAddAgent
|
|
| RMDCDeleteAgent !DCDeleteAgent
|
|
| -- Custom types
|
|
RMSetCustomTypes !CustomTypes
|
|
| -- Api limits
|
|
RMSetApiLimits !ApiLimit
|
|
| RMRemoveApiLimits
|
|
| -- Metrics config
|
|
RMSetMetricsConfig !MetricsConfig
|
|
| RMRemoveMetricsConfig
|
|
| -- Inherited roles
|
|
RMAddInheritedRole !InheritedRole
|
|
| RMDropInheritedRole !DropInheritedRole
|
|
| -- Metadata management
|
|
RMReplaceMetadata !ReplaceMetadata
|
|
| RMExportMetadata !ExportMetadata
|
|
| RMClearMetadata !ClearMetadata
|
|
| RMReloadMetadata !ReloadMetadata
|
|
| RMGetInconsistentMetadata !GetInconsistentMetadata
|
|
| RMDropInconsistentMetadata !DropInconsistentMetadata
|
|
| -- Introspection options
|
|
RMSetGraphqlSchemaIntrospectionOptions !SetGraphqlIntrospectionOptions
|
|
| -- Network
|
|
RMAddHostToTLSAllowlist !AddHostToTLSAllowlist
|
|
| RMDropHostFromTLSAllowlist !DropHostFromTLSAllowlist
|
|
| -- QueryTags
|
|
RMSetQueryTagsConfig !SetQueryTagsConfig
|
|
| -- OpenTelemetry
|
|
RMSetOpenTelemetryConfig !OpenTelemetryConfig
|
|
| RMSetOpenTelemetryStatus !OtelStatus
|
|
| -- Debug
|
|
RMDumpInternalState !DumpInternalState
|
|
| RMGetCatalogState !GetCatalogState
|
|
| RMSetCatalogState !SetCatalogState
|
|
| RMTestWebhookTransform !(Unvalidated TestWebhookTransform)
|
|
| -- Feature Flags
|
|
RMGetFeatureFlag !GetFeatureFlag
|
|
| -- Bulk metadata queries
|
|
RMBulk [RQLMetadataRequest]
|
|
|
|
data RQLMetadataV2
|
|
= RMV2ReplaceMetadata !ReplaceMetadataV2
|
|
| RMV2ExportMetadata !ExportMetadata
|
|
|
|
data RQLMetadataRequest
|
|
= RMV1 !RQLMetadataV1
|
|
| RMV2 !RQLMetadataV2
|