mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-17 20:41:49 +03:00
11a454c2d6
This commit applies ormolu to the whole Haskell code base by running `make format`. For in-flight branches, simply merging changes from `main` will result in merge conflicts. To avoid this, update your branch using the following instructions. Replace `<format-commit>` by the hash of *this* commit. $ git checkout my-feature-branch $ git merge <format-commit>^ # and resolve conflicts normally $ make format $ git commit -a -m "reformat with ormolu" $ git merge -s ours post-ormolu https://github.com/hasura/graphql-engine-mono/pull/2404 GitOrigin-RevId: 75049f5c12f430c615eafb4c6b8e83e371e01c8e
135 lines
5.3 KiB
Haskell
135 lines
5.3 KiB
Haskell
module Hasura.Server.API.Metadata where
|
|
|
|
import Hasura.RQL.DDL.Action
|
|
import Hasura.RQL.DDL.ComputedField
|
|
import Hasura.RQL.DDL.EventTrigger
|
|
import Hasura.RQL.DDL.Metadata
|
|
import Hasura.RQL.DDL.Permission
|
|
import Hasura.RQL.DDL.QueryCollection
|
|
import Hasura.RQL.DDL.QueryTags
|
|
import Hasura.RQL.DDL.Relationship
|
|
import Hasura.RQL.DDL.Relationship.Rename
|
|
import Hasura.RQL.DDL.RemoteRelationship
|
|
import Hasura.RQL.DDL.Schema
|
|
import Hasura.RQL.DDL.Schema.Source
|
|
import Hasura.RQL.Types
|
|
import Hasura.SQL.AnyBackend
|
|
|
|
data RQLMetadataV1
|
|
= -- Sources
|
|
RMAddSource !(AnyBackend AddSource)
|
|
| RMDropSource DropSource
|
|
| RMRenameSource !RenameSource
|
|
| -- Tables
|
|
RMTrackTable !(AnyBackend TrackTableV2)
|
|
| RMUntrackTable !(AnyBackend UntrackTable)
|
|
| RMSetTableCustomization !(AnyBackend SetTableCustomization)
|
|
| -- Tables (PG-specific)
|
|
RMPgSetTableIsEnum !SetTableIsEnum
|
|
| -- Tables permissions
|
|
RMCreateInsertPermission !(AnyBackend (CreatePerm InsPerm))
|
|
| RMCreateSelectPermission !(AnyBackend (CreatePerm SelPerm))
|
|
| RMCreateUpdatePermission !(AnyBackend (CreatePerm UpdPerm))
|
|
| RMCreateDeletePermission !(AnyBackend (CreatePerm DelPerm))
|
|
| RMDropInsertPermission !(AnyBackend (DropPerm InsPerm))
|
|
| RMDropSelectPermission !(AnyBackend (DropPerm SelPerm))
|
|
| RMDropUpdatePermission !(AnyBackend (DropPerm UpdPerm))
|
|
| RMDropDeletePermission !(AnyBackend (DropPerm DelPerm))
|
|
| RMSetPermissionComment !(AnyBackend SetPermComment)
|
|
| -- Tables relationships
|
|
RMCreateObjectRelationship !(AnyBackend CreateObjRel)
|
|
| RMCreateArrayRelationship !(AnyBackend CreateArrRel)
|
|
| RMDropRelationship !(AnyBackend DropRel)
|
|
| RMSetRelationshipComment !(AnyBackend SetRelComment)
|
|
| RMRenameRelationship !(AnyBackend RenameRel)
|
|
| -- Tables remote relationships
|
|
RMCreateRemoteRelationship !(AnyBackend RemoteRelationship)
|
|
| RMUpdateRemoteRelationship !(AnyBackend RemoteRelationship)
|
|
| RMDeleteRemoteRelationship !(DeleteRemoteRelationship ('Postgres 'Vanilla))
|
|
| -- Functions
|
|
RMTrackFunction !(AnyBackend TrackFunctionV2)
|
|
| RMUntrackFunction !(AnyBackend UnTrackFunction)
|
|
| -- Functions permissions
|
|
RMCreateFunctionPermission !(AnyBackend FunctionPermissionArgument)
|
|
| RMDropFunctionPermission !(AnyBackend FunctionPermissionArgument)
|
|
| -- Computed fields (PG-specific)
|
|
RMAddComputedField !(AddComputedField ('Postgres 'Vanilla))
|
|
| RMDropComputedField !(DropComputedField ('Postgres 'Vanilla))
|
|
| -- Tables event triggers
|
|
RMCreateEventTrigger !(AnyBackend CreateEventTriggerQuery)
|
|
| RMDeleteEventTrigger !(AnyBackend DeleteEventTriggerQuery)
|
|
| RMRedeliverEvent !(AnyBackend RedeliverEventQuery)
|
|
| RMInvokeEventTrigger !(AnyBackend InvokeEventTriggerQuery)
|
|
| -- Remote schemas
|
|
RMAddRemoteSchema !AddRemoteSchemaQuery
|
|
| RMUpdateRemoteSchema !AddRemoteSchemaQuery
|
|
| RMRemoveRemoteSchema !RemoteSchemaNameQuery
|
|
| RMReloadRemoteSchema !RemoteSchemaNameQuery
|
|
| RMIntrospectRemoteSchema !RemoteSchemaNameQuery
|
|
| -- Remote schemas permissions
|
|
RMAddRemoteSchemaPermissions !AddRemoteSchemaPermission
|
|
| RMDropRemoteSchemaPermissions !DropRemoteSchemaPermissions
|
|
| -- Scheduled triggers
|
|
RMCreateCronTrigger !CreateCronTrigger
|
|
| RMDeleteCronTrigger !ScheduledTriggerName
|
|
| RMCreateScheduledEvent !CreateScheduledEvent
|
|
| RMDeleteScheduledEvent !DeleteScheduledEvent
|
|
| RMGetScheduledEvents !GetScheduledEvents
|
|
| RMGetEventInvocations !GetEventInvocations
|
|
| -- Actions
|
|
RMCreateAction !CreateAction
|
|
| RMDropAction !DropAction
|
|
| RMUpdateAction !UpdateAction
|
|
| RMCreateActionPermission !CreateActionPermission
|
|
| RMDropActionPermission !DropActionPermission
|
|
| -- Query collections, allow list related
|
|
RMCreateQueryCollection !CreateCollection
|
|
| RMDropQueryCollection !DropCollection
|
|
| RMAddQueryToCollection !AddQueryToCollection
|
|
| RMDropQueryFromCollection !DropQueryFromCollection
|
|
| RMAddCollectionToAllowlist !CollectionReq
|
|
| RMDropCollectionFromAllowlist !CollectionReq
|
|
| -- Rest endpoints
|
|
RMCreateRestEndpoint !CreateEndpoint
|
|
| RMDropRestEndpoint !DropEndpoint
|
|
| -- 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
|
|
| -- Debug
|
|
RMDumpInternalState !DumpInternalState
|
|
| RMGetCatalogState !GetCatalogState
|
|
| RMSetCatalogState !SetCatalogState
|
|
| RMValidateWebhookTransform !ValidateWebhookTransform
|
|
| -- Bulk metadata queries
|
|
RMBulk [RQLMetadataRequest]
|
|
|
|
data RQLMetadataV2
|
|
= RMV2ReplaceMetadata !ReplaceMetadataV2
|
|
| RMV2ExportMetadata !ExportMetadata
|
|
|
|
data RQLMetadataRequest
|
|
= RMV1 !RQLMetadataV1
|
|
| RMV2 !RQLMetadataV2
|