graphql-engine-1.0.0: GraphQL API over Postgres
Safe HaskellSafe-Inferred
LanguageHaskell2010

Hasura.LogicalModel.API

Description

Define and handle v1/metadata API operations to track, untrack, and get logical models.

Synopsis

Documentation

data GetLogicalModel (b :: BackendType) Source #

API payload for the get_logical_model endpoint.

Constructors

GetLogicalModel 

runGetLogicalModel :: forall b m. (BackendMetadata b, MonadError QErr m, MetadataM m) => GetLogicalModel b -> m EncJSON Source #

Handler for the get_logical_model endpoint.

execTrackLogicalModel :: forall b m. (BackendMetadata b, MonadError QErr m) => TrackLogicalModel b -> Metadata -> m (MetadataObjId, MetadataModifier) Source #

Handler for the track_logical_model endpoint. The type 'TrackLogicalModel b' (appearing here in wrapped as 'BackendTrackLogicalModel b' for AnyBackend compatibility) is defined in 'class LogicalModelMetadata'.

execUntrackLogicalModel :: forall b m. (BackendMetadata b, MonadError QErr m) => UntrackLogicalModel b -> Metadata -> m (MetadataObjId, MetadataModifier) Source #

Handler for the untrack_logical_model endpoint.

data CreateLogicalModelPermission a (b :: BackendType) Source #

A permission for logical models is tied to a specific name and source. This wrapper adds both of those things to the JSON object that describes the permission.

Instances

Instances details
FromJSON (PermDef b a) => FromJSON (CreateLogicalModelPermission a b) Source # 
Instance details

Defined in Hasura.LogicalModel.API

Generic (CreateLogicalModelPermission a b) Source # 
Instance details

Defined in Hasura.LogicalModel.API

Associated Types

type Rep (CreateLogicalModelPermission a b) :: Type -> Type #

type Rep (CreateLogicalModelPermission a b) Source # 
Instance details

Defined in Hasura.LogicalModel.API

type Rep (CreateLogicalModelPermission a b) = D1 ('MetaData "CreateLogicalModelPermission" "Hasura.LogicalModel.API" "graphql-engine-1.0.0-inplace" 'False) (C1 ('MetaCons "CreateLogicalModelPermission" 'PrefixI 'True) (S1 ('MetaSel ('Just "clmpSource") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 SourceName) :*: (S1 ('MetaSel ('Just "clmpName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 LogicalModelName) :*: S1 ('MetaSel ('Just "clmpInfo") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (PermDef b a)))))

data DropLogicalModelPermission (b :: BackendType) Source #

To drop a permission, we need to know the source and name of the logical model, as well as the role whose permission we want to drop.

dropLogicalModelInMetadata :: forall b. BackendMetadata b => SourceName -> LogicalModelName -> MetadataModifier Source #

TODO: should this cascade and also delete associated permissions?