graphql-engine-1.0.0: GraphQL API over Postgres
Safe HaskellNone
LanguageHaskell2010

Hasura.Base.Error

Synopsis

Documentation

data QErr Source #

Constructors

QErr 

Fields

Instances

Instances details
Eq QErr Source # 
Instance details

Defined in Hasura.Base.Error

Methods

(==) :: QErr -> QErr -> Bool #

(/=) :: QErr -> QErr -> Bool #

ToJSON QErr Source # 
Instance details

Defined in Hasura.Base.Error

Methods

toJSON :: QErr -> Value

toEncoding :: QErr -> Encoding

toJSONList :: [QErr] -> Value

toEncodingList :: [QErr] -> Encoding

FromPGConnErr QErr Source # 
Instance details

Defined in Hasura.Base.Error

Methods

fromPGConnErr :: PGConnErr -> QErr

FromPGTxErr QErr Source # 
Instance details

Defined in Hasura.Base.Error

Methods

fromPGTxErr :: PGTxErr -> QErr

MonadError QErr CacheBuild Source # 
Instance details

Defined in Hasura.RQL.DDL.Schema.Cache.Common

Monad m => MonadError QErr (MetadataStorageT m) Source # 
Instance details

Defined in Hasura.Metadata.Class

Monad m => MonadError QErr (RunT m) Source # 
Instance details

Defined in Hasura.RQL.Types.Run

Methods

throwError :: QErr -> RunT m a #

catchError :: RunT m a -> (QErr -> RunT m a) -> RunT m a #

MonadIO m => MonadMSSQLTx (TxET QErr m) Source # 
Instance details

Defined in Hasura.Backends.MSSQL.Connection

Methods

liftMSSQLTx :: TxE QErr a -> TxET QErr m a Source #

MonadIO m => MonadTx (TxET QErr m) Source # 
Instance details

Defined in Hasura.Backends.Postgres.Connection.MonadTx

Methods

liftTx :: TxE QErr a -> TxET QErr m a Source #

MonadResolveSource m => MonadResolveSource (TxET QErr m) Source # 
Instance details

Defined in Hasura.RQL.Types.Source

CacheRM m => CacheRM (TxET QErr m) Source # 
Instance details

Defined in Hasura.RQL.Types.SchemaCache

CacheRWM m => CacheRWM (TxET QErr m) Source # 
Instance details

Defined in Hasura.RQL.Types.SchemaCache.Build

MonadMetadataStorageQueryAPI m => MonadMetadataStorageQueryAPI (TxET QErr m) Source # 
Instance details

Defined in Hasura.Metadata.Class

MonadMetadataStorage m => MonadMetadataStorage (ExceptT QErr m) Source # 
Instance details

Defined in Hasura.Metadata.Class

Methods

fetchMetadataResourceVersion :: ExceptT QErr m MetadataResourceVersion Source #

fetchMetadata :: ExceptT QErr m (Metadata, MetadataResourceVersion) Source #

fetchMetadataNotifications :: MetadataResourceVersion -> InstanceId -> ExceptT QErr m [(MetadataResourceVersion, CacheInvalidations)] Source #

setMetadata :: MetadataResourceVersion -> Metadata -> ExceptT QErr m MetadataResourceVersion Source #

notifySchemaCacheSync :: MetadataResourceVersion -> InstanceId -> CacheInvalidations -> ExceptT QErr m () Source #

getCatalogState :: ExceptT QErr m CatalogState Source #

setCatalogState :: CatalogStateType -> Value -> ExceptT QErr m () Source #

getMetadataDbUid :: ExceptT QErr m MetadataDbId Source #

checkMetadataStorageHealth :: ExceptT QErr m () Source #

getDeprivedCronTriggerStats :: [TriggerName] -> ExceptT QErr m [CronTriggerStats] Source #

getScheduledEventsForDelivery :: ExceptT QErr m ([CronEvent], [OneOffScheduledEvent]) Source #

insertCronEvents :: [CronEventSeed] -> ExceptT QErr m () Source #

insertOneOffScheduledEvent :: OneOffEvent -> ExceptT QErr m EventId Source #

insertScheduledEventInvocation :: Invocation 'ScheduledType -> ScheduledEventType -> ExceptT QErr m () Source #

setScheduledEventOp :: ScheduledEventId -> ScheduledEventOp -> ScheduledEventType -> ExceptT QErr m () Source #

unlockScheduledEvents :: ScheduledEventType -> [ScheduledEventId] -> ExceptT QErr m Int Source #

unlockAllLockedScheduledEvents :: ExceptT QErr m () Source #

clearFutureCronEvents :: ClearCronEvents -> ExceptT QErr m () Source #

getOneOffScheduledEvents :: ScheduledEventPagination -> [ScheduledEventStatus] -> ExceptT QErr m (WithTotalCount [OneOffScheduledEvent]) Source #

getCronEvents :: TriggerName -> ScheduledEventPagination -> [ScheduledEventStatus] -> ExceptT QErr m (WithTotalCount [CronEvent]) Source #

getInvocations :: GetInvocationsBy -> ScheduledEventPagination -> ExceptT QErr m (WithTotalCount [ScheduledEventInvocation]) Source #

deleteScheduledEvent :: ScheduledEventId -> ScheduledEventType -> ExceptT QErr m () Source #

insertAction :: ActionName -> SessionVariables -> [Header] -> Value -> ExceptT QErr m ActionId Source #

fetchUndeliveredActionEvents :: ExceptT QErr m [ActionLogItem] Source #

setActionStatus :: ActionId -> AsyncActionStatus -> ExceptT QErr m () Source #

fetchActionResponse :: ActionId -> ExceptT QErr m ActionLogResponse Source #

clearActionData :: ActionName -> ExceptT QErr m () Source #

setProcessingActionLogsToPending :: LockedActionIdArray -> ExceptT QErr m () Source #

MonadMetadataStorage m => MonadMetadataStorage (TxET QErr m) Source # 
Instance details

Defined in Hasura.Metadata.Class

Methods

fetchMetadataResourceVersion :: TxET QErr m MetadataResourceVersion Source #

fetchMetadata :: TxET QErr m (Metadata, MetadataResourceVersion) Source #

fetchMetadataNotifications :: MetadataResourceVersion -> InstanceId -> TxET QErr m [(MetadataResourceVersion, CacheInvalidations)] Source #

setMetadata :: MetadataResourceVersion -> Metadata -> TxET QErr m MetadataResourceVersion Source #

notifySchemaCacheSync :: MetadataResourceVersion -> InstanceId -> CacheInvalidations -> TxET QErr m () Source #

getCatalogState :: TxET QErr m CatalogState Source #

setCatalogState :: CatalogStateType -> Value -> TxET QErr m () Source #

getMetadataDbUid :: TxET QErr m MetadataDbId Source #

checkMetadataStorageHealth :: TxET QErr m () Source #

getDeprivedCronTriggerStats :: [TriggerName] -> TxET QErr m [CronTriggerStats] Source #

getScheduledEventsForDelivery :: TxET QErr m ([CronEvent], [OneOffScheduledEvent]) Source #

insertCronEvents :: [CronEventSeed] -> TxET QErr m () Source #

insertOneOffScheduledEvent :: OneOffEvent -> TxET QErr m EventId Source #

insertScheduledEventInvocation :: Invocation 'ScheduledType -> ScheduledEventType -> TxET QErr m () Source #

setScheduledEventOp :: ScheduledEventId -> ScheduledEventOp -> ScheduledEventType -> TxET QErr m () Source #

unlockScheduledEvents :: ScheduledEventType -> [ScheduledEventId] -> TxET QErr m Int Source #

unlockAllLockedScheduledEvents :: TxET QErr m () Source #

clearFutureCronEvents :: ClearCronEvents -> TxET QErr m () Source #

getOneOffScheduledEvents :: ScheduledEventPagination -> [ScheduledEventStatus] -> TxET QErr m (WithTotalCount [OneOffScheduledEvent]) Source #

getCronEvents :: TriggerName -> ScheduledEventPagination -> [ScheduledEventStatus] -> TxET QErr m (WithTotalCount [CronEvent]) Source #

getInvocations :: GetInvocationsBy -> ScheduledEventPagination -> TxET QErr m (WithTotalCount [ScheduledEventInvocation]) Source #

deleteScheduledEvent :: ScheduledEventId -> ScheduledEventType -> TxET QErr m () Source #

insertAction :: ActionName -> SessionVariables -> [Header] -> Value -> TxET QErr m ActionId Source #

fetchUndeliveredActionEvents :: TxET QErr m [ActionLogItem] Source #

setActionStatus :: ActionId -> AsyncActionStatus -> TxET QErr m () Source #

fetchActionResponse :: ActionId -> TxET QErr m ActionLogResponse Source #

clearActionData :: ActionName -> TxET QErr m () Source #

setProcessingActionLogsToPending :: LockedActionIdArray -> TxET QErr m () Source #

MonadQueryTags m => MonadQueryTags (TxET QErr m) Source # 
Instance details

Defined in Hasura.GraphQL.Execute.Backend

data QErrExtra Source #

Extra context for a QErr, which can either be information from an internal error (e.g. from Postgres, or from a network operation timing out), or context provided when an external service or operation fails, for instance, a webhook error response may provide additional context in the extensions key.

Constructors

ExtraExtensions Value 
ExtraInternal Value 

Instances

Instances details
Eq QErrExtra Source # 
Instance details

Defined in Hasura.Base.Error

ToJSON QErrExtra Source # 
Instance details

Defined in Hasura.Base.Error

Methods

toJSON :: QErrExtra -> Value

toEncoding :: QErrExtra -> Encoding

toJSONList :: [QErrExtra] -> Value

toEncodingList :: [QErrExtra] -> Encoding

overrideQErrStatus :: Status -> Code -> QErr -> QErr Source #

Overrides the status and code of a QErr while retaining all other fields.

prefixQErr :: Text -> QErr -> QErr Source #

Prefixes the message of a QErr while retaining all other fields.

showQErr :: QErr -> Text Source #

encodeGQLErr :: Bool -> QErr -> Value Source #

encodeQErr :: Bool -> QErr -> Value Source #

err400 :: Code -> Text -> QErr Source #

err404 :: Code -> Text -> QErr Source #

err405 :: Code -> Text -> QErr Source #

err401 :: Code -> Text -> QErr Source #

err409 :: Code -> Text -> QErr Source #

err429 :: Code -> Text -> QErr Source #

err500 :: Code -> Text -> QErr Source #

throw400 :: QErrM m => Code -> Text -> m a Source #

throw404 :: QErrM m => Text -> m a Source #

throw405 :: QErrM m => Text -> m a Source #

MethodNotAllowed

throw401 :: QErrM m => Text -> m a Source #

AccessDenied

throw409 :: QErrM m => Text -> m a Source #

Conflict

throw429 :: QErrM m => Code -> Text -> m a Source #

throw500 :: QErrM m => Text -> m a Source #

throw500WithDetail :: QErrM m => Text -> Value -> m a Source #

modifyQErr :: QErrM m => (QErr -> QErr) -> m a -> m a Source #

modifyErr :: QErrM m => (Text -> Text) -> m a -> m a Source #

modifyErrA :: ArrowError QErr arr => arr (e, s) a -> arr (e, (Text -> Text, s)) a Source #

liftTxtMod :: (Text -> Text) -> QErr -> QErr Source #

modifyErrAndSet500 :: QErrM m => (Text -> Text) -> m a -> m a Source #

liftTxtMod500 :: (Text -> Text) -> QErr -> QErr Source #

withPathE :: ArrowError QErr arr => arr (e, s) a -> arr (e, (JSONPathElement, s)) a Source #

withPathKA :: ArrowError QErr arr => arr (e, s) a -> arr (e, (Text, s)) a Source #

withPathK :: QErrM m => Text -> m a -> m a Source #

withPathIA :: ArrowError QErr arr => arr (e, s) a -> arr (e, (Int, s)) a Source #

withPathI :: QErrM m => Int -> m a -> m a Source #

indexedFoldlA' :: (ArrowChoice arr, ArrowError QErr arr, Foldable t) => arr (e, (b, (a, s))) b -> arr (e, (b, (t a, s))) b Source #

indexedTraverseA_ :: (ArrowChoice arr, ArrowError QErr arr, Foldable t) => arr (e, (a, s)) b -> arr (e, (t a, s)) () Source #

indexedMapM_ :: (QErrM m, Foldable t) => (a -> m b) -> t a -> m () Source #

indexedForM_ :: (QErrM m, Foldable t) => t a -> (a -> m b) -> m () Source #

indexedMapM :: QErrM m => (a -> m b) -> [a] -> m [b] Source #

indexedForM :: QErrM m => [a] -> (a -> m b) -> m [b] Source #

liftIResult :: QErrM m => IResult a -> m a Source #

iResultToMaybe :: IResult a -> Maybe a Source #

runAesonParser :: QErrM m => (v -> Parser a) -> v -> m a Source #

decodeValue :: (FromJSON a, QErrM m) => Value -> m a Source #